Alternative ways to resolve a conflict


History of the Computer; How Computers Add - A Logical Approach

We looked at Number Systems and counting (seeand 2 outputs, one for the result (1 or 0),
It's a Binary World - How Computers Count)and a carry out, (1 or 0). In this case the
last time. As a quick refresher, we saw thatcarry input is not used. We use 2 XOR gates,
computers are made up of many units of 0 and2 AND gates and an OR gate to make up the
1, the binary system. 1 is the highest digitadder for 1 bit.Now we go another step, and
possible so numbers in the computer areforget about gates, because now we have a
stored as for example 1010 or 10 in decimal.Logic Block, an ADDER. Our computer is
We also saw that these binary numbers can bedesigned by using various combinations of
seen as octal (8) or hexadecimal (16) numberslogic blocks. As well as the adder we might
- in this case 1010 becomes 15 octal, or Ahave a multiplier (a series of adders) and
hex.You probably realise that the 'standard'other components.Our ADDER block takes one
PC code is in 8 bit bytes taking the hexbit (0 or 1) from each number to be added,
system a stage further. You may also knowplus the Carry bit (0 or 1) and produces an
that processors, and Windows software thatoutput of 0 or 1, and a carry of 0 or 1. A
runs on them, have progressed from 8 bits totable of the input A, B and carry, and output
16  bits  to  32  bits  to  64  bits.O and Carry, looks like this:-With no Carry
in:A  B  c  O  C
Basically this means the computer can work
on 1,2, 4 or 8 bytes at once. Don't worry if0  0  0  0  0
this is all Gobbledegook, you don't need it
to understand how computers add!OK now to the1  0  0  1  0
Math - cringe time! It's a little more
complicated than last time, but if you think0  1  0  1  0
logically, like a computer, realising they
are really dumb, you will sail through it!We1  1  0  0  1With  Carry  in:A  B  c  O  C
take a break here to look at a bit of math
you may not have heard of - Boolean Algebra.0  0  1  1  0
Once again it's really simple, but it shows
you how a computer works, and why it is so1  0  1  0  1
pedantic!Boolean Algebra is named after
George Boole, an English Mathematician in the0  1  1  0  1
19th Century. He devised the logic system
used in digital computers more than a century1 1 1 1 1 This is known as a Truth Table, it
before there was a computer to use it!Inshows output state for any given input
Boolean Algebra, instead of + and - etc. westate.Let's add 2+3 decimal. That is 010 plus
use AND and OR to form our logic steps.For011 binary. We will need 3 ADDER blocks for
example:-x OR y = z means if x or y isdecimal bit values of 1, 2 and 4)The first
present, we get z.However,x AND y = z meansADDER takes the Least Significant Bit
that both x and y need to be present to get(decimal bit value 1) from each number. Input
z.We can also consider an XOR (eXclusiveA will be 0 Input B will be 1With no carry -
OR).x XOR y=z means that x or y BUT NOT BOTH0.From the truth table this gives an output
must be present to get z.That's it! That'sof 1 and a carry of 0 (3rd row).BIT 1 RESULT
all the math you need to understand how a= 1At the same time the next ADDER (decimal
computer adds. Told you it was simple!How dobit value 2) has inputs of A - 1, B - 1 and a
we use this logic in the computer? We make upcarry of 0, giving an output of 0 with a
a little electronic circuit called a Gatecarry bit of 1 (4th row).BIT 2 RESULT = 0At
with transistors and things, so we can workthe same time the next ADDER (decimal bit
on our binary numbers stored in a register -value 4) has inputs ofA - 0, B -0 and a carry
just a bit of memory. (And that's the lastof 1, giving an output of 1 with no carry - 0
electronics you'll hear about!). We make an(5th  row).
AND gate, an OR gate, and an XOR gate.When we
add in decimal, for example 9+3 we get 2BIT 4 RESULT = 1.So we have bits 4,2,1 as
'units' and carry one to the 10s, giving101 Binary or 4+0+1=5 decimal.It seems like a
10+2=12Remember the binary bit values inlaborious way to do it, but our computer can
Decimal - 1,2,4,8 etc? We start at 0, then 1have 64 adders or more, adding simultaneously
in the first bit position, the 1 bit. If wetwo large numbers billions of times a second.
add 1 + 1 binary we have to end up with 10,This is where the computer scores.Next time
which has a 1 bit in the second bit position,we will get to how a computer performs more
and  a  0  in  the  first,  giving  Decimalcomplcated operations, and it's simple!Tony
is an experienced computer engineer. He is
2+0=2. This second bit position is formed bycurrently webmaster and contributer to
a CARRY from the first bit.To make an adderlooking at things you can do At Home. A set
we must duplicate with a logic circuit theof diagrams accompanying these articles may
way we add in binary. To add 1+1 we need 3be seen on that website. Go to to start.
inputs, one for each bit, and a carry in -



1 A B C 38 39 41 42 43 44 45 46 47 48 49 50 51 52 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86