Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 1

163838010.xls.

ms_office

sign bit 1 if neg.

signed16-bit binary adder demo


512 256 128 64 32 16 8 4 2 1 = = base 10

bit weight carry A B sum base 10

32768 16384 8192 4096 2048 1024

0 B 0

0 A

0 carry in

Single Step

Go
Click 'Go' to start (you may checkmark the 'Single Step' option before starting). You will be prompted to enter two numbers A and B.

0 XOR 0 OR 0 XOR 0

0 XOR 0 XOR 0 sum bit

<== one of 16 identical stages 0


Two's complement is where each bit of the absolute value of a negative binary number is inverted, then incremented by '1'. Mathematically, adding the positive value to the negative value always results in zero. Here are some zero sum examples to try: 1-1 -255+255

carry out to stage left

Your two decimal numbers, A and B, are converted into 16-bit binary numbers in rows 5 and 6. NOTE that two's complement math is used. Then starting at the rightmost stage, and propagating left thru 15 more identical stages, in each stage three bits (A, B, and the propagated carry) will be input into five logic gates to determine two outputs: a sum bit for the stage, and a carry bit to propagate left.

XOR gates: in out -- --00 0 01 1 10 1 11 0

OR gate: in out -- --00 0 01 1 10 1 11 1

You might also like