%PDF-1.2
%âãÏÓ
1 0 obj<>endobj
2 0 obj<>endobj
3 0 obj<>endobj
4 0 obj<>endobj
5 0 obj<>endobj
6 0 obj<>endobj
7 0 obj<>endobj
8 0 obj<>endobj
9 0 obj<>endobj
10 0 obj<>endobj
11 0 obj<>endobj
12 0 obj<>endobj
13 0 obj<>endobj
14 0 obj<>endobj
15 0 obj<>endobj
16 0 obj<>endobj
19 0 obj<>/ProcSet[/PDF/Text]/XObject<<>>>>endobj
20 0 obj<>endobj
21 0 obj<>stream
BT
/F1 10 Tf
1 0 0 1 50 752 Tm
12 TL
T*(Title: )Tj
T*(How Computers Add - A Logical Approach)Tj
T*()Tj
T*(Word Count:)Tj
T*(847)Tj
T*()Tj
T*(Summary:)Tj
T*(We looked at Number Systems and counting \(see It's a Binary World - How Computers Count\) last time. As a quick refresher, we saw that computers are made up of many units of 0 and 1, the binary system. 1 is the highest digit possible so numbers in the computer are stored as for example 1010 or 10 in decimal. We also saw that these binary numbers can be seen as octal \(8\) or hexadecimal \(16\) numbers - in this case 1010 becomes 15 octal, or A hex.)Tj
T*()Tj
T*(You probably realise that the...)Tj
T*()Tj
T*()Tj
T*(Keywords:)Tj
T*()Tj
T*()Tj
T*()Tj
T*(Article Body:)Tj
T*(We looked at Number Systems and counting \(see It's a Binary World - How Computers Count\) last time. As a quick refresher, we saw that computers are made up of many units of 0 and 1, the binary system. 1 is the highest digit possible so numbers in the computer are stored as for example 1010 or 10 in decimal. We also saw that these binary numbers can be seen as octal \(8\) or hexadecimal \(16\) numbers - in this case 1010 becomes 15 octal, or A hex.)Tj
T*()Tj
T*(You probably realise that the 'standard' PC code is in 8 bit bytes taking the hex system a stage further. You may also know that processors, and Windows software that runs on them, have progressed from 8 bits to 16 bits to 32 bits to 64 bits. Basically this means the computer can work on 1,2, 4 or 8 bytes at once. Don't worry if this is all Gobbledegook, you don't need it to understand how computers add!)Tj
T*()Tj
T*(OK now to the Math - cringe time! It's a little more complicated than last time, but if you think logically, like a computer, realising they are really dumb, you will sail through it!)Tj
T*()Tj
T*(We take a break here to look at a bit of math you may not have heard of - Boolean Algebra. Once again it's really simple, but it shows you how a computer works, and why it is so pedantic!)Tj
T*()Tj
T*(Boolean Algebra is named after George Boole, an English Mathematician in the 19th Century. He devised the logic system used in digital computers more than a century before there was a computer to use it!)Tj
T*()Tj
T*(In Boolean Algebra, instead of + and - etc. we use AND and OR to form our logic steps.)Tj
T*(For example:-)Tj
T*()Tj
T*(x OR y = z means if x or y is present, we get z.)Tj
T*(However,)Tj
T*(x AND y = z means that both x and y need to be present to get z.)Tj
T*(We can also consider an XOR \(eXclusive OR\).)Tj
T*(x XOR y=z means that x or y BUT NOT BOTH must be present to get z. )Tj
T*()Tj
T*(That's it! That's all the math you need to understand how a computer counts. Told you it was simple!)Tj
T*()Tj
T*(How do we use this logic in the computer? We make up a little electronic circuit called a Gate with transistors and things, so we can work on our binary numbers stored in a register - just a bit of memory. \(And that's the last electronics you'll hear about!\). We make an AND gate, an OR gate, and an XOR gate )Tj
T*()Tj
T*(When we add in decimal, for example 9+3 we get 2 'units' and carry one to the 10s, giving 10+2=12)Tj
T*()Tj
T*(Remember the binary bit values in Decimal 1,2,4,8 etc? We start at 0 then 1 in the first bit position, the 1 bit. If we add 1 + 1 binary we have to end up with 10, which has a 1 bit in the second bit position, and a 0 in the first, giving Decimal 2+0=2. This second bit position is formed by a CARRY from the first bit.)Tj
T*()Tj
T*(To make an adder we must duplicate with a logic circuit the way we add in binary. To add 1+1 we need 3 inputs, one for each bit, and a carry in, and 2 outputs, one for the result \(1 or 0\), and a carry out, \(1 or 0\). In this case the carry input is not used. We use 2 XOR gates, 2 AND gates and an OR gate to make up the adder for 1 bit.)Tj
T*()Tj
T*(Now we go another step, and forget about gates, because now we have a Logic Block, an ADDER. Our computer is designed by using various combinations of logic blocks. As well as the adder we might have a multiplier \(a series of adders\) and other components.)Tj
T*()Tj
T*(Our ADDER block takes one bit \(0 or 1\) from each number to be added, plus the Carry bit \(0 or 1\) and produces an output of 0 or 1, and a carry of 0 or 1. A table of the input A, B and Carry, and output O and Carry, looks like this:-)Tj
T*()Tj
T*(With no Carry in:)Tj
T*()Tj
T*(A B c O C )Tj
T*(0 0 0 0 0)Tj
T*(1 0 0 1 0)Tj
T*(0 1 0 1 0)Tj
T*(1 1 0 0 1)Tj
T*()Tj
T*(With Carry in:)Tj
T*()Tj
ET
endstream
endobj
22 0 obj
4535
endobj
23 0 obj<>endobj
24 0 obj<>stream
BT
/F1 10 Tf
1 0 0 1 50 752 Tm
12 TL
T*(A B c O C)Tj
T*(0 0 1 1 0)Tj
T*(1 0 1 0 1)Tj
T*(0 1 1 0 1)Tj
T*(1 1 1 1 1)Tj
T*()Tj
T*(This is known as a Truth Table, it shows output state for any given input state.)Tj
T*()Tj
T*(Let's add 2+3 decimal. That is 010 plus 011 binary. We will need 3 ADDER blocks for decimal bit values of 1, 2 and 4\))Tj
T*()Tj
T*(The first ADDER takes the Least Significant Bit \(decimal bit value 1\) from each number. Input A will be 0, input B will be 1 with no carry - 0.)Tj
T*()Tj
T*(From the truth table this gives an output of 1 and a carry of 0 \(3rd row\). BIT 1 RESULT = 1)Tj
T*()Tj
T*(At the same time the next ADDER \(decimal bit value 2\) has inputs of 1, 1 and a carry of 0, giving an output of 0 with a carry bit of 1 \(4th row\). BIT 2 RESULT = 0)Tj
T*()Tj
T*(The next ADDER \(decimal bit value 4\) has inputs of 0, 0 and a carry of 1, giving an output of 1 with no carry - 0 \(5th row\). BIT 4 RESULT = 1.)Tj
T*()Tj
T*(So we have bits 4,2,1 as 101 or 4+1=5.)Tj
T*()Tj
T*(It seems like a laborious way to do it, but our computer can have 64 adders or more, adding simultaneously two large numbers billions of times a second. This is where the computer scores.)Tj
T*()Tj
T*(Next time we will get to how a computer performs more complcated operations, and it's simple!)Tj
T*()Tj
T*()Tj
T*()Tj
T*(This is a demo version of txt2pdf v.10.1)Tj
T*(Developed by SANFACE Software http://www.sanface.com/)Tj
T*(Available at http://www.sanface.com/txt2pdf.html)Tj
T*()Tj
ET
endstream
endobj
25 0 obj
1502
endobj
17 0 obj<>endobj
18 0 obj<>endobj
xref
0 26
0000000000 65535 f
0000000015 00000 n
0000000172 00000 n
0000002009 00000 n
0000002091 00000 n
0000002181 00000 n
0000002268 00000 n
0000002362 00000 n
0000002446 00000 n
0000002538 00000 n
0000002627 00000 n
0000002724 00000 n
0000002811 00000 n
0000002900 00000 n
0000002987 00000 n
0000003080 00000 n
0000003148 00000 n
0000009768 00000 n
0000009813 00000 n
0000003222 00000 n
0000003419 00000 n
0000003504 00000 n
0000008089 00000 n
0000008110 00000 n
0000008195 00000 n
0000009747 00000 n
trailer
<>
startxref
9894
%%EOF