
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The concept of binary numbers, their significance in computing, and the process of converting decimal numbers to binary and binary numbers to decimal. It includes examples and step-by-step instructions.
What you will learn
Typology: Exercises
1 / 24
This page cannot be seen from the preview
Don't miss anything!
What are binary numbers and why do we use them?
Thousands Hundreds Tens ones
The number system we commonly use is decimal numbers, also known as Base 10. Ones, tens, hundreds, and thousands. For example, 4351 represents 4 thousands, 3 hundreds, 5 tens, and 1 ones.
Thousands Hundreds Tens ones
In order to convey “yes and no” to a computer, we use the numbers one (“yes” or “on”) and zero (“no” or “off”).
DECIMAL NUMBERS (BASE 10)
To break it down further, the number 4351 represents 1 times 1, 5 times 10, 3 times 100, and 4 times 1000. Each step to the left is another multiplication of 10. This is why it is called Base 10, or decimal numbers. The prefix dec- means ten.
Base 10 10 3 10 2 10 1 10 0 1000 100 10 1 Base 2 2 3 2 2 2 1 2 0 8 4 2 1 Binary numbers, or Base 2, use the number 2 instead of the number 10. The prefix bi- means two.
Base 10 10 3 10 2 10 1 10 0 1000 100 10 1 Base 2 2 3 2 2 2 1 2 0 8 4 2 1 Two raised to the zero power is one. Two raised to the first power is two. Two raised to the second power is four (or 2 times 2). Two raised to the third power is eight (or 2 times 2 times 2).
Base 2 2 3 2 2 2 1 2 0 8 4 2 1 2 7 2 6 2 5 2 4 128 64 32 16 BINARY NUMBERS (BASE 2) Thirty-two times two is sixty-four, or two to the sixth power. And sixty-four times two is one hundred twenty eight, or two to the seventh power.
DECIMAL
BINARY
3
2
1
0
15 1111 The number fifteen is written in decimal as one ten and five ones. In binary, the number fifteen is written as one eight, one four, one two, and one one. These are called bits, and they are either one (on) or zero (off).
8 BITS = 1 BYTE = 1 OCTET 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128 64 32 16 8 4 2 1 x x x x x x x x 0 0 0 0 0 0 0 0 = = = = = = = = 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0 If every bit is a zero…that’s eight zeros… and we multiply each power of two by zero, and add them up… the decimal equivalent of that octet is zero.
8 BITS = 1 BYTE = 1 OCTET 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128 64 32 16 8 4 2 1 x x x x x x x x 0 0 0 0 0 0 0 0 = = = = = = = = 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0 x x x x x x x x 1 1 1 1 1 1 1 1 = = = = = = = = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 If every bit is a one…that’s eight ones… and we multiply each power of two by one, and add them up… the decimal equivalent is two hundred and fifty-five. Therefore, each octet can have a value between 0 and 255.
2
2
2
2
2
2
2
2
128 64 32 16 8 4 2 1 Binary notation → 11000000. 10101000. 10000011. 01101001 To convert binary numbers to decimal numbers, we use the powers of two again. Write the octet below…one in the 128 column, one in the sixty-four column, and zeros for the rest. 1 1 0 0 0 0 0 0
128 64 32 16 8 4 2 1 1 1 0 0 0 0 0 0 128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = Binary notation → 11000000. 10101000. 10000011. 01101001 196 Then multiply each column and add across…128 plus 64 plus zero equals 196.
Decimal notation → 192. 168. 131 128 64 32 16 8 4 2 1 Binary notation → 11000000. 10101000. 131
Decimal notation → 192. 168. 131 128 64 32 16 8 4 2 1 Binary notation → 11000000. 10101000. 131