# The Naked Scientists Forum

### Author Topic: What is meant by computers using binary?  (Read 9992 times)

#### Monster92

• Guest
##### What is meant by computers using binary?
« on: 17/06/2010 11:30:02 »
Ross Boswell  asked the Naked Scientists:

Hello,

I often get told that computers speak in zeros and ones. How does this work?

thanks
from Ross

What do you think?
« Last Edit: 17/06/2010 11:30:02 by _system »

#### graham.d

• Neilep Level Member
• Posts: 2208
##### What is meant by computers using binary?
« Reply #1 on: 17/06/2010 12:58:09 »
We are used to representing numbers in decimal 0,1,2,3,4,5,6,7,8,9 then 10,11,12...

Binary is another way to represent numbers: 0,1,10,11,100,101,110,111,1000,1001...

This is convenient because electronic memory is designed to store either 0 (off for example) or 1 (on for example). The same store also can represent logic statements 0=false, 1=true and can easily be configured into logic functions called gates so that you can represent (for example) if A is true and B is true then C is true; this would be C = A AND B.

Because Binary representation fits well with the way electronics work, it is used more or less exclusively in computers.

#### samaste.march

• First timers
• Posts: 4
##### What is meant by computers using binary?
« Reply #2 on: 19/06/2010 06:51:10 »
Binary code is useful in computer, it includes only zero and one. There is also subtraction and multiplication like mathematical aptitude. It is generally used in nodes like n-nodes, d-nodes, It is electronic memory.

#### fedora

• First timers
• Posts: 1
##### What is meant by computers using binary?
« Reply #3 on: 19/06/2010 07:29:33 »
Basically these 1's and 0's are nothing but two voltage levels. 1 means high voltage 0 means low voltage. Whenever we have data like 101110 machines don't know what is 1 or 0 , so the corresponding voltage level has to be maintained.

we use transistors to hold this data usually a transistor can hold one BIT (stands for binary digit) i.e. either 0 or 1 ( high voltage or low voltage) at any point of time.

#### Geezer

• Neilep Level Member
• Posts: 8328
• "Vive la résistance!"
##### What is meant by computers using binary?
« Reply #4 on: 19/06/2010 17:08:46 »
Basically these 1's and 0's are nothing but two voltage levels. 1 means high voltage 0 means low voltage. Whenever we have data like 101110 machines don't know what is 1 or 0 , so the corresponding voltage level has to be maintained.

we use transistors to hold this data usually a transistor can hold one BIT (stands for binary digit) i.e. either 0 or 1 ( high voltage or low voltage) at any point of time.

It typically takes a lot more than a single transistor to store one bit of information. Also, as you point out, binary information can be encoded by voltages, but it can also be encoded by many other means, for instance; electric current, electric charge, magnetic polarization, acoustic delay, ink on paper, ink in plastic, light, holes in paper/card to name but a few.

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #5 on: 20/06/2010 03:47:50 »
The arithmetic system in counts and measures are numerically recognized in decimal form --->  base 10 .
Computers uses a system of switches either, on or off!
Depending on the logic "1" is on, "0" is off.
This however has only (2) Binary positions.
Base 2
The wonderful part of these 2 combinations, in a cascade of switching parts, it is easy for the mechanical observation.

1,2,4,8,16, 32, 64, 128,  256,  512, 1024, 2048, 4096

Easiest way to see this conception is in a video of a  homemade digital abacus

NR=1

#### techmind

• Hero Member
• Posts: 934
• Un-obfuscated
##### What is meant by computers using binary?
« Reply #6 on: 20/06/2010 23:30:55 »
As said, each bit (binary digit) has two states, "on" and "off", "1" and "0" or "high" (e.g. 3.3volts) and "low" (e.g. zero) voltage.

With four bits you can count from 0 to 15, with 8 bits, from 0 to 255 etc.

decimal    binary
00          0000
01          0001
02          0010
03          0011
04          0100
05          0101
06          0110
07          0111
08          1000
09          1001
10          1010
11          1011
12          1100
13          1101
14          1110
15          1111
16         10000
etc

An you count in binary, the last (rightmost) bit alternatively toggles between 0 and 1, and each time a digit flips back to a zero from a one, the 'carry' is taken to the next bit to the left...

You can 'decode' binary by working from right to left, noting that the rightmost bit is worth 1, the next rightmost as 2, then 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072...

As well as for counting and data, you use binary "address busses" to access different locations in computer memory.

This is where a lot of the "funny" numbers you see in computers come from, why "1k" is usually 1024 bytes (2 to the power of 10) rather than 1000 bytes.
1 megabyte = 2^20 bytes = 1048576 bytes (the maximum you can address with 20 wires).

#### Geezer

• Neilep Level Member
• Posts: 8328
• "Vive la résistance!"
##### What is meant by computers using binary?
« Reply #7 on: 21/06/2010 00:52:24 »
Ah, right!

So how do they add and subtract?

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #8 on: 21/06/2010 01:58:37 »
Ah, right!

So how do they add and subtract?
CPU has an instruction set and an ALU
BCD structure and a shifting cascade of bits

http://mathforum.org/library/drmath/view/51901.html

#### syhprum

• Neilep Level Member
• Posts: 3764
• Thanked: 14 times
##### What is meant by computers using binary?
« Reply #9 on: 21/06/2010 08:20:09 »
One of the largest early computers ENIAC used decimal.

#### Bored chemist

• Neilep Level Member
• Posts: 8583
• Thanked: 41 times
##### What is meant by computers using binary?
« Reply #10 on: 21/06/2010 18:48:45 »
Once yuo have coded the numbers as a set of "true and false" or 1 and 0 you can use logic to add them together.
This explains it, but you might need an explanation of the explanation.

(BTW very few systems use BCD so I'm not sure why Tommya300 mentioned it.)

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #11 on: 21/06/2010 19:36:09 »
One of the largest early computers ENIAC used decimal.
wasn't that computer considered an anolog computer?

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #12 on: 21/06/2010 19:38:59 »
Once yuo have coded the numbers as a set of "true and false" or 1 and 0 you can use logic to add them together.
This explains it, but you might need an explanation of the explanation.

(BTW very few systems use BCD so I'm not sure why Tommya300 mentioned it.)
A simple way the math mechanics can easily be seen when explained

Usually engineers call an ALU the circuit that performs arithmetic operations in integer formats (like two's complement and BCD), while the circuits that calculate on more complex formats like floating point, complex numbers, etc. usually receive a more illustrious name.
« Last Edit: 21/06/2010 20:58:55 by tommya300 »

#### Geezer

• Neilep Level Member
• Posts: 8328
• "Vive la résistance!"
##### What is meant by computers using binary?
« Reply #13 on: 22/06/2010 01:14:20 »
One of the largest early computers ENIAC used decimal.
wasn't that computer considered an anolog computer?

No, ENIAC was digital. ENIAC, EDSAC and SOLIDAC were all digital machines.

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #14 on: 22/06/2010 10:39:56 »
One of the largest early computers ENIAC used decimal.
wasn't that computer considered an anolog computer?

No, ENIAC was digital. ENIAC, EDSAC and SOLIDAC were all digital machines.

So that was the beginning of the digital computers
Sorry I was thinking of the Univac

#### graham.d

• Neilep Level Member
• Posts: 2208
##### What is meant by computers using binary?
« Reply #15 on: 22/06/2010 14:16:37 »
I thought the UNIVAC was digital too.

http://en.wikipedia.org/wiki/UNIVAC_I

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #16 on: 22/06/2010 15:50:50 »
I thought the UNIVAC was digital too.

http://en.wikipedia.org/wiki/UNIVAC_I
Darn for the longest time I thought different, Was there some that had analog inputs to a digial working?
I read the postwar, the company expanded its interests in electronics and computing, producing the company's first digital computer, SPEEDAC, in 1953.

MONIAC is this a type I first just heard of...

#### graham.d

• Neilep Level Member
• Posts: 2208
##### What is meant by computers using binary?
« Reply #17 on: 22/06/2010 16:07:58 »
Analog computers were used in WWII to control weapons. I seem to remember that some torpedos were set up with an analog computer prior to launch. When I say "seem to remember" I mean from the excellent permanent exhibition in Weymouth. I am getting on a bit but not that old.

#### imatfaal

• Neilep Level Member
• Posts: 2787
• rouge moderator
##### What is meant by computers using binary?
« Reply #18 on: 22/06/2010 17:03:01 »
Graham - that tallies with my father's accounts of gun turret aiming in wwII .  i am not sure how they worked (and not sure what end they tried to achieve) but he had to put in the known wingspan of the target on a dial and track the apparent width of the target with the sight.   i think matching the reticule with the known size allowed the gunner to know the range was correct.  matthew

#### tommya300

• Hero Member
• Posts: 655
##### What is meant by computers using binary?
« Reply #19 on: 22/06/2010 18:16:54 »
Thank all I got it what was needed

#### Carbonizer

• First timers
• Posts: 5
##### What is meant by computers using binary?
« Reply #20 on: 02/07/2010 21:52:16 »
Once yuo have coded the numbers as a set of "true and false" or 1 and 0 you can use logic to add them together.
This explains it, but you might need an explanation of the explanation.

(BTW very few systems use BCD so I'm not sure why Tommya300 mentioned it.)

Boolean Logic uses two values (True and False) and three operators (Not, And, and Or).

F And F = F
T And F = F
F And T = F
T And T = T

F Or F = F
F Or T = T
T Or F = T
T Or T = T

Not F = T
Not T = F

There is another operator, called Exclusive-Or, which is just a shortcut for "(A Or B) And (Not (A And B))". (I overused parens there to make the order of operations unambiguous. Standard precedence for Boolean algebra is Not, then And, then Or.)

F Xor F = F
F Xor T = T
T Xor F = T
T Xor T = F

And, Or, and Not are operations that can be performed by circuitry incorporating transistors.

Using Boolean Logic, you can assign numeric value to strings of Boolean values and do math with them, as follows:

#  D3 D2 D1
0  F  F  F
1  F  F  T
2  F  T  F
3  F  T  T
4  T  F  F
5  T  F  T
6  T  T  F
7  T  T  T

The simplest example is addition of two single-digit binary numbers (call them A and B to produce a two-digit binary number result (call its digits D1 and D2, see the chart above)
To perform addition of A + B, then D2 = A And B and D1 = A Xor B.

Addition of longer binary numbers is more complex but not too hard to figure out from the basics given here.

#### Geezer

• Neilep Level Member
• Posts: 8328
• "Vive la résistance!"
##### What is meant by computers using binary?
« Reply #21 on: 02/07/2010 22:30:45 »
Once yuo have coded the numbers as a set of "true and false" or 1 and 0 you can use logic to add them together.
This explains it, but you might need an explanation of the explanation.

(BTW very few systems use BCD so I'm not sure why Tommya300 mentioned it.)

Boolean Logic uses two values (True and False) and three operators (Not, And, and Or).

F And F = F
T And F = F
F And T = F
T And T = T

F Or F = F
F Or T = T
T Or F = T
T Or T = T

Not F = T
Not T = F

There is another operator, called Exclusive-Or, which is just a shortcut for "(A Or B) And (Not (A And B))". (I overused parens there to make the order of operations unambiguous. Standard precedence for Boolean algebra is Not, then And, then Or.)

F Xor F = F
F Xor T = T
T Xor F = T
T Xor T = F

And, Or, and Not are operations that can be performed by circuitry incorporating transistors.

Using Boolean Logic, you can assign numeric value to strings of Boolean values and do math with them, as follows:

#  D3 D2 D1
0  F  F  F
1  F  F  T
2  F  T  F
3  F  T  T
4  T  F  F
5  T  F  T
6  T  T  F
7  T  T  T

The simplest example is addition of two single-digit binary numbers (call them A and B to produce a two-digit binary number result (call its digits D1 and D2, see the chart above)
To perform addition of A + B, then D2 = A And B and D1 = A Xor B.

Addition of longer binary numbers is more complex but not too hard to figure out from the basics given here.

If you really wanted to, you could build an entire computer with just two operators e.g. AND and NOT, and they could be provided by a single logic element - a two input NAND gate (an AND gate with a NOTed output).

#### recover data

• First timers
• Posts: 1
##### What is meant by computers using binary?
« Reply #22 on: 13/07/2010 09:58:34 »
Hello,
I saw your post. I want to express some words. Computer use the binary number system to manipulate and store all of their including numbers, videos, graphics files and folders. Binary number system is also called base-2 number system is a method to represent by 0 and 1.
Thanks
« Last Edit: 13/07/2010 17:25:14 by Geezer »

#### jasikajohnson

• First timers
• Posts: 4
##### What is meant by computers using binary?
« Reply #23 on: 15/07/2010 06:52:49 »
Yes computer understand a binary,binary code is useful in computer, it includes only zero and one. There is also subtraction and multiplication like mathematical aptitude. It is generally used in nodes like n-nodes, d-nodes, It is electronic memory,

#### The Naked Scientists Forum

##### What is meant by computers using binary?
« Reply #23 on: 15/07/2010 06:52:49 »