News, learn, share and discuss about Africa & other life issues with over 250, 000 members worldwide & thousands of discussion going on. CLICK HERE TO JOIN FREE and get access to write, reply, use private message & much more free!. CLICK HERE TO SAY HELLO
AfricaTopForum
May 25, 2012, 02:40:28 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Rules Search Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: How Computers Add - A Logical Approach  (Read 146 times)
0 Members and 1 Guest are viewing this topic.
Webmaster
Global Captain
*****
Online Online

Gender: Male
Posts: 2049



Activity
30.33%



« on: October 03, 2011, 10:10:34 AM »
ReplyReply


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 the teams are made up of many units of 0 and 1, the binary system. 1 is the highest possible so digits are stored on your computer such as 1010 or 10 in decimal. We also saw that these binary numbers can be seen as octal (Cool or hexadecimal numbers (16) - in this case 1010 becomes 15 octal or hexadecimal A.

Is likely to realize that the "standard" PC code is 8 bytes bit hexadecimal system taking a step further. You can also find processors and Windows software that runs on them, have gone from 8 bits to 16 bits to 32 bits to 64 bits. Basically this means that the team can work on 1.2 bytes, 4 and 8 at a time. Do not worry if this is all gibberish, which does not need to understand how computers add!

Mathematics OK now - time shaking! It's a bit more complicated than last time, but if you think logically, like a computer, realizing they are really dumb, you will sail through it!

We take a break here to see a bit of math may not have heard - Boolean algebra. Again, very simple, but showing how a computer works, and why it is so pedantic!

Boolean algebra is the name of George Boole, an English mathematician in the 19th century. He devised the system of logic used in digital computers over a century before there was a computer to use it!

In Boolean algebra, instead of + and -, so we use AND and OR to form our logical steps.
For example: -

X or Y = z means that if X or Y is present, we z.
However,
y = z means that X and Y must be present to get z.
We can also consider an XOR (exclusive OR).
x XOR y = z means that X or Y, but not both must be present to get z.

That's it! That's all the math you need to understand how a computer counts. I told you it was simple!

How do we use this logic in the computer? We called Puerta small electronic circuit of transistors and things, so we can work on our binary numbers stored in a register - just a little memory. (And that's the last you will hear about electronics!). We make a gate, an OR gate and an XOR gate

When we add in decimal, for example, 9 +3 we have two "units" and take one year to 10, giving 10 +2 = 12

Remember that the binary bit values ??in decimal 1,2,4,8, etc? We started at 0, 1 in the position of first bit, bit 1. If we add 1 + 1 binary we have to finish with 10, which has a 1 bit second bit position, and a 0 in the first, giving decimal 2 +0 = 2. This second bit position comprises a first carry bit.

To make a snake you have to duplicate with a logic circuit how to add in binary. To add a 1 we have 3 inputs, one for each bit, and carrying one, and 2 outputs, one for the result (1 or 0), and carry out, (1 or 0). In this case the input carry is not used. We use two XOR gates, 2 AND gates and an OR gate to compensate for the 1-bit adder.

Now we go a step further and forget about the doors, because we now have a logic block, a snake. Our equipment is designed with various combinations of logic blocks. Just as the snake that could have a multiplier effect (a series of supplements) and other components.

Our ADDER block takes one bit (0 or 1) of each number being added, in addition to the carry bit (0 or 1) and produces an output of 0 or 1, and a carry of 0 or 1. A table of input A, B, Carry, and the S and Carry, is as follows: -

Do not carry on:

AB c OC
0 0 0 0 0
1 0 0 1 0
0 1 0 1 0
1 1 0 0 1

To carry on:

AB c OC
0 0 1 1 0
1 0 1 0 1
0 1 1 0 1
1 1 1 1 1

This is known as a truth table showing the output state for any input state.

Let's add 2 3 decimal places. That is 010 more than 011 binary. We will need three blocks bit adder for decimal values ??of 1, 2 and 4)

The first snake takes the least significant bit (bit decimal value 1) of each number. At the entrance is 0, input B is 1 without carrying - 0.

From the truth table this gives an output of 1 and a carry of 0 (3 rd row). BIT 1 result = 1

At the same time, the snake follows (decimal bit value 2) has entries 1, 1 and a carry of 0, giving an output of 0 to a 1-bit (fourth row). BIT 2 result = 0

The snake follows (decimal bit value 4) has inputs of 0, 0 and a carry of 1, giving a signal without carrying - 0 (fifth row). BIT 4 result = 1.

So we have 4,2,1 as 101 bits or 4 +1 = 5.

It seems a laborious way to do it, but our team can have 64 or more snakes, while adding 2000000000-1 large number of times per second. This is where the team scores.

Next time we'll get to how a computer performs more complcated operations, and simple!
Logged
AfricaTopForum
   

 Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
ZIMBABWE: Quiet diplomacy replaced with a more direct approach
AFRICA POLITICS NEWS BOARD
Perfect 0 273 Last post September 01, 2009, 05:17:04 AM
by Perfect
Computer Forensics - Finding Out What The Bad Guys Did With Their Computers!
COMPUTERS and HARDWARES DISCUSSION BOARD
Perfect 0 262 Last post April 22, 2011, 02:35:03 AM
by Perfect
A Checklist for Used Computers
COMPUTERS and HARDWARES DISCUSSION BOARD
Webmaster 0 100 Last post October 05, 2011, 11:26:02 AM
by Webmaster
FREE SEO DO IT YOUSELF APPROACH
SEARCH ENGINE OPTIMIZATION DISCUSSION BOARD
Webmaster 0 121 Last post October 17, 2011, 02:38:45 AM
by Webmaster
Quiz Yourself About Your Love With Computers
COMPUTERS and HARDWARES DISCUSSION BOARD
Webmaster 0 120 Last post November 08, 2011, 05:30:49 AM
by Webmaster

If you require any help or if you have any questions, challenges, comments, suggestions or criticism please don’t hesitate Click here to write,
if it is sensitive send Personal Message to Global Captain or Admin. We love to hear from members and general public.

Contact |African Discussion Forum | Powered by SMF | SMF © 2006-2011, Simple Machines