REDSTONEPEDIA › Circuits › Adders
Full adder: adds two bits and a carry
full adder: two bits and a carry in · 36 blocks
Adds two bits, A and B, and a carry in (CIN): the sum output (S) is on when one or three of them are on, the carry output (COUT) when two or more are.
reacts in 18 ticks (0.9 s) · fits in 4×4×4
Try it
Turn on A0, B0 and CIN (the carry in) with the buttons under the view: S0 lights when one or three are on, COUT when two or more are (1 + 1 + 1 = 11 in binary). Press play under the view to watch a demo on a loop; touch any other control to take over.
How this design does it: Two half adders stacked: the bottom one adds A and B, and its sum climbs a redstone dust to the top one, which adds the carry-in and gives the sum.
Build it
Download .litematic Download the design as text
The .litematic opens in Litematica (Minecraft 26.3): every block of the design in one region. The text file is the same build written as plain text, block by block.
Blocks used: comparator glass redstone torch redstone wire repeater stone
Details: how it works, measurements and properties
In depth
adds two binary numbers, bit by bit with the carry
How to try it
Press play under the view to watch the demo on a loop (the badge reads demo with the step it is on; the same sequence is drawn as a timing diagram below). Touch any control to stop it and try the circuit yourself.
To try it: press and hold the A0 button of the bar (or the cell tagged A0) to power that input; a quick tap sends a short 2-tick pulse; press and hold the B0 button of the bar (or the cell tagged B0) to power that input; a quick tap sends a short 2-tick pulse; press and hold the CIN button of the bar (or the cell tagged CIN) to power that input; a quick tap sends a short 2-tick pulse.
Inputs are tagged in lime; the output is tagged COUT, S0: the redstone lamp in that cell (the view adds it to show the output) lights while the output is on (the output strip by the demo badge shows its last 40 game ticks, 2 seconds). Drag to look around, pinch or scroll to zoom, step one game tick at a time with the step button.
Inputs and output over time
The inputs follow this schedule (the 3D view's demo plays the same). Lime: an input is on; orange: the output is on (taller = a stronger signal, 1 to 15). Time runs left to right in game ticks (20 ticks = 1 s).
Swipe the diagram sideways: the whole sequence lasts 1289 ticks (1 min 4.45 s).
Step by step (5 lines)
on-blip: 2 inputs change from a=0 b=0 cin=0 to a=0 b=1 cin=1: s0 on-blip: 2 inputs change from a=1 b=1 cin=0 to a=1 b=0 cin=1: s0 gray: 7 states, worst latency 18 ticks (0.9 s) walk: 25 states, worst latency 18 ticks (0.9 s) jump: 16 states, worst latency 18 ticks (0.9 s)
Measurements
| metric | value | what it means |
|---|---|---|
| latency | 18 ticks (0.9 s) (a0 rises from a=0 b=1 cin=1) | the worst time from an input change to the output's change |
| glitches | 11 | extra output changes while the inputs change |
| carry | in and out | carry in and out: it takes a carry input and gives a carry output, so copies chain into wider adders; carry out: a carry output only |
Notes from its designer
Two half adders stacked: the bottom one adds A and B, and its sum climbs a redstone dust to the top one, which adds the carry-in and gives the sum. Each half adder lights its own carry block, and the carry-out lamp sits between the two blocks, so it lights when either carry does. A glass block above the bottom carry torch keeps that torch from lighting the lamp.
Properties
| Study | Adders |
|---|---|
| Kind | Full adder: adds two bits and a carry |
| Blocks placed | 36 (not counting the input levers or buttons and the lamp the view adds) |
| Box | 4×4×4 (64 blocks of space) |
| Made of (the blocks that change state) | comparator, redstone torch, redstone wire, repeater |
| Inputs / outputs | A0 (repeater), B0 (repeater), CIN (repeater) / COUT, S0 |
| Design file | fa3d-36b |
The design file
Design file (44 lines)
# Full adder: full adder: two bits and a carry in · 36 blocks # https://vjeux.github.io/redstonepedia/circuits/adder/fa3d-36b.html name: fa3d-36b circuit: adder 1 port input.a0: 3 1 -1 port input.b0: 2 1 3 port input.cin: 3 3 -1 port output.s0: 3 3 2 port output.cout: 0 2 2 origin: 0 0 -1 palette: S minecraft:stone G minecraft:glass d minecraft:redstone_wire[east=side,north=side,power=0,south=side,west=side] a minecraft:comparator[facing=south,mode=subtract,powered=false] b minecraft:comparator[facing=east,mode=subtract,powered=false] n minecraft:comparator[facing=north,mode=subtract,powered=false] w minecraft:comparator[facing=west,mode=subtract,powered=false] t minecraft:redstone_wall_torch[facing=south,lit=true] u minecraft:redstone_wall_torch[facing=north,lit=true] e minecraft:redstone_wall_torch[facing=east,lit=true] W minecraft:redstone_wall_torch[facing=west,lit=true] p minecraft:repeater[delay=1,facing=north,locked=false,powered=false] q minecraft:repeater[delay=1,facing=east,locked=false,powered=false] layer 0: .... SSS. .SS. .SS. layer 1: S... adbt upd. Sbd. layer 2: d... SSS. GSS. ..S. layer 3: ..W. ddn. nqd. Sew.