BARBELITH underground
 

Subcultural engagement for the 21st Century...
Barbelith is a new kind of community (find out more)...
You can login or register.


How Does a Calculator Work?

 
 
Our Lady Has Left the Building
08:27 / 09.01.07
I'm just wondering if someone can explain to me how a calculator does what it does? I understand that everything is represented in binary, but how does the calculator do functions upon two binary numbers? Aren't the functions represented in binary in it's memory also? How does the calculator 'know' that this set of binary numbers is actually a function and not a number, and how does it do any function when all it has are 1s and 0s to play with?
 
 
Kiltartan Cross
10:58 / 09.01.07
I think the essence of it is that it doesn't work upon individual binary digits in a straight sequence, but upon groups of binary digits.

We could imagine a rule which said "look at information coming in in groups of 4 bits; the first 4 bits you receive will tell you what to do (eg. 0001 means ADD, 0010 means SUBTRACT and so on), the second 4 bits will be a number and the third 4 bits will be another number".

We could then receive a binary string like 000100010001 and it would translate as ADD 0001 (1) to 0001 (1) and return a final string of 4 bits, 0010 (2). A presence of 0001 on the first part of the information would open up (at the hardware level) certain connections between the next two parts which would perform the ADDing operation.

Or maybe 001000010010 which would translate as SUBTRACT 0001 (1) from 0010 (2) and return 0001 (1). A presence of 0010 on the first part would open up connections which would perform the SUBTRACTing operation.

In practice it's going to be hideously more complicated but (unless I'm grossly mistaken, which is entirely possible) all computers eventually boil down to a set of hardware gates deciding what to do when they get certain groups of bits.
 
 
Lagrange's Nightmare
21:05 / 09.01.07
Yeah i think essentially you are wanting to look at this. The article isn't really that good but also look at the info on half adders too.

Reallly basically calculators are just basic microprocessors and you have two inputs and a control input that will select the appropriate function to be performed (ie pass the two inputs to the correct set of digital circuits.) Then you just need the controlling circuitry that will store the numbers you enter etc...
 
 
Jub
18:00 / 10.01.07
[threadrot]

There's 10 kinds of people in the world. Those that understand binary and those who don't.

[/threadrot]
 
 
Good Intentions
08:32 / 13.01.07
In practice it's going to be hideously more complicated but (unless I'm grossly mistaken, which is entirely possible) all computers eventually boil down to a set of hardware gates deciding what to do when they get certain groups of bits.

Yes, though at that low a level it's better not to talk about "deciding" since you have in front of you the actual transistors/etc that, depending on the inputs, manipulate the single bits in the required ways.
 
 
Our Lady Has Left the Building
10:49 / 13.01.07
Thanks yous!
 
  
Add Your Reply