"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

Computer Memory Definitions

What is the Binary Number System?

SUMMARY: Briefly explains the binary number system and its importance in computer technology.


 

As mentioned elsewhere in MalekTips, a bit is the smallest unit of memory a computer can hold. Bits can either hold a value of 0 or 1, on or off, yes or no, etc.

While a single bit holds very little data, bits are strung together to represent larger pieces of data. As these bits represent larger numbers, a system of numbering, binary, was adopted.

First, consider our standard "decimal" number system that has a base of 10. This means that after one counts ten numbers (0-9), to create the tenth number a second digit prefixes the value. When both digits reach 9 (the number 99), a third digit prefixes the value, making it 100. If all four digits reach 9 (the number 999), a third digit prefixes the value, making it 1000, and so forth.

If you add 5 + 5, there is no single digit that represents the result as each digit can only hold a value from 0-9. Two digits are needed to represent the number ten.

As opposed to the decimal number system, binary uses a base of 2. Each digit can only hold the value of 0 or 1, just like a bit can only hold the value of 0 or 1.

Thus in binary, if you add 1 + 1, a single digit cannot represent the result. Just as adding 5 + 5 in decimal creates a number containing a digit of 1 and a digit of 0, adding 1 + 1 in binary creates a number containing a digit of 1 and a digit of 0. This number in decimal would be 2.

If you add 1 to binary 10 (decimal 2), you would get binary 11 (decimal 3). Here is a chart:

Decimal  Binary
---------------
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
...
If you understand exponentiation, note that every time a digit is added to a binary number the value goes up by a power of 2 (represented by 2^).
Decimal  Binary    Exponentiation
---------------------------------
1 1 2^0
2 10 2^1
4 100 2^2
8 1000 2^3
16 10000 2^4
32 100000 2^5
64 1000000 2^6
128 10000000 2^7
...
A byte is a series of 8 bits and can represent 256 (2^8) numbers, the smallest being binary 00000000 (decimal 0) and the largest is binary 11111111 (decimal 255, or 2^8 - 1).

Thus, each bit in a byte, when flipped from 0 to 1, raises the value of the number in decimal by 2^ and the bit's position (positions are read from right-to-left).
Decimal   Byte       Exponentiation
--------------------------------------------
1 00000001 2^0 (right-most bit
= the 0th position)
2 00000010 2^1
4 00000100 2^2
8 00001000 2^3
16 00010000 2^4
32 00100000 2^5
64 01000000 2^6
128 10000000 2^7 (left-most bit
= the 7th position)



 

Got something to add? Post a comment!

Everyone is invited to submit comments. Registered users also receive their own visitor profile page with a summary of recent posts.
Register | Login

Your name:
 E-mail:
* Home/Blog Page:
Comment:
(Max chars: 5000)

* = optional field

 


Print This Tip

Get E-Mail When New Tips are Online

Return to the Computer Memory Definitions page.

 


New in MalekTips:

RSS Feeds- Subscribe!

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 


( sample / details )
( opt-out instructions )