Appendix – Decimal and Binary System
Gottfried Wilhelm Leibniz discovered the binary number system. Leibniz was a prominent German mathematician, philosopher, physicist, and statesman. Instead of using ten digits (0 through 9) to write numbers, he invented a way to write numbers using just two digits (0 and 1). This is called binary system , which is the foundation of all digital computers.
Leibniz is also credited with inventing differential and integral calculus in the year 1684, independently of Sir Isaac Newton, who was using similar methods for his theory of gravity.
Leibniz also invented the Leibniz wheel, the first calculating machine that could add, subtract, multiply, and divide. This machine was the first mass-produced mechanical calculator.
Leibniz was a childhood prodigy. He became fluent in Latin and studied the works of Greek scholars when he was only twelve. He entered the University of Leipzig when he was fourteen, where he studied philosophy, mathematics, and law.
Gottfried Leibniz is considered one of the greatest and most influential thinkers and logicians in history.
Decimal Numbering System:
You have read about the decimal numbering system in your math class. In the decimal numbering system, there are ten symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). If you have a number greater than 9, you use the place value as shown below.
Place | Million | Hundred-Thousands | Ten-thousands | Thousands | Hundreds | Tens | Units |
Place Value | 10**6 | 10**5 | 10**4 | 10**3 | 10**2 | 10**1 | 10**0 |
Place Value | 1,000,000 | 100,000 | 10,000 | 1,000 | 100 | 10 | 1 |
Number | 6 | 2 | 4 | 3 | 7 | 0 | 9 |
Thus, the number 6,243,709 is created by multiplying each digit by its place value as below.
6*1,000,000 + 2*100,000 + 4*10,000 + 3*1,000 + 7*100 + 0*10 + 9*1
Binary Numbering System:
The computer cannot understand decimal numbers. The computer is made using transistor chips. The transistors are like switches, which are either ON or OFF. The ON and OFF states can be represented as “1” and ‘0″ respectively or as “TRUE” and “FALSE”. Since transistors have only two states (0 and 1), the computer does arithmetic using only two symbols (‘0’, and ‘1’). This is called Binary Arithmetic.
The following is the place value table for a binary arithmetic system.
Place | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Place Value | 2**8 | 2**7 | 2**6 | 2**5 | 2**4 | 2**3 | 2**2 | 2**1 | 2**0 |
Place value | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Number | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 |
So, what does the binary number 110010111 convert to in the decimal system?
Just as we calculated the value of the number in the decimal system, we will use the same method, except we replace ’10’ with ‘2’.
Number = 1*256 + 1*128 + 0*64 + 0*32 + 1*16 + 0*8 + 1*4 + 1*2 + 1*1
= 256 + 128 + 16 + 4 +2 + 1
= 407
Below is a Table of a few binary numbers and their decimal equivalents.
8-BIT BINARY NUMBER | DECIMAL EQUIVALENT |
---|---|
00000000 | 0 |
00000001 | 1 |
00000010 | 2 |
00000011 | 3 |
00000100 | 4 |
00000101 | 5 |
00000110 | 6 |
00000111 | 7 |
00001000 | 8 |
00001001 | 9 |
00001010 | 10 |
00001011 | 11 |
00001100 | 12 |
00001101 | 13 |
00001110 | 14 |
00001111 | 15 |
11111111 | 255 |
In the above Table, there are 8 binary digits (called bits). Recall that in the section on Color Theory, we mentioned that each of the colors R, G, and B can have a value from 0 to 255. Each of the RGB colors is represented by 8 bits. Since the 8-bit binary numbers can have a value between 0 to 255, each of the RGB colors has values between 0 and 255.