|
Page 3 of 4
Logic and switches
After George Boole had described his Boolean logic, and after various people had built logical machines based on it, the simplicity of the “true/false” algebra was beginning to be understood. Charles Pierce sketched out how batteries and switches could be used to calculate logic but this was ahead of its time. Fifty years later in the 1940 Claude Shannon looked at the ideas again and noticed that he could build not just logic circuits using high and low voltages to represent true and false, he could also build arithmetic circuits.
All you have to do is write down the addition table for binary arithmetic for a single “digit” or bit:
A + B = R 0 0 0 0 1 1 1 0 1 1 1 0
You might recognise this as the truth table for the Exclusive OR and this is indeed all that is needed to add two bits together - as long as you are prepared to ignore the carry.
If you want to generate the carry then you need to add another column to the logic table
A + B = R C 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1
Now you can see that the carry is simply an And operation. Put the two together and you can add two bits and generate a result and a carry - this is called a half adder because it doesn’t deal with the problem of taking account of anything that might have been generated by an earlier pair of bits being added.
 A half adder takes two bits and adds them to give a result and a carry
To create a full adder all we need to do is combine two half adders so that the first adds the two bits to produce a result and a carry and the second adds the result and the carry to produce a final result and a final carry.

A full adder takes two bits and the carry from the previous addition and produces a result and a carry
A little while after Shannon worked out that binary arithmetic was very easy to implement, the same idea was rediscovered by George Stibitz. He was musing on the problems of using relays in telephone circuits when he suddenly realised that he could use the open/closed positions as 0/1 and do arithmetic. He quickly worked out a half adder and built it on his kitchen table using light bulbs to show the results. In 1940 he demonstrated a simple binary relay computer and in the audience was John Mauchly who went on to build, with John Eckert, the first electronic computer - ENIAC.
 
Shannon and his first adder
<ASIN:0780334264>
<ASIN:0192853619>
<ASIN:B001NJCYZQ@UK@FR@DE>
<ASIN:B000NJVY3U@COM>
|