0% found this document useful (0 votes)
12 views

Binary System

Uploaded by

sarabegermy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Binary System

Uploaded by

sarabegermy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

How many numbers

are there in one digit?


• 0
• 1
• 2
• 3
• 4
• 5
• 6
• 7
• 8
• 9
Why ten?
• Because we have ten fingers in our hands
• 10 = 1 full two-hands + 0 fingers

• 20 = 2 full two-hands + 0 fingers

• 30 = 3 full two-hands + 0 fingers

• 36 = 3 full two-hands + 6 fingers


How many fingers does a computer
have?
• Computers are made of tiny switches which must be on the ON or
OFF position
• Two:
1- Electric current is passing (ON or 1)
2- No electric current (OFF or 0)
Learning Objectives
1- Convert from binary system to denary system
2- What is a bit?
3- What is a byte?
4- Convert from denary system to binary system
Learning Objective 1:
Convert from binary system to denary system

128 64 32 16 8 4 2 1

What to you observe?


Learning Objective 1:
Convert from binary system to denary system

128 64 32 16 8 4 2 1

27 26 25 24 23 2² 21 20

1 0 0 0 1 1 0 1

For example:
Since 0 = OFF & 1 = On, we will calculate only the place value of ones
10001101 in binary system = 128+8+4+1 = 141
Learning Objective 1:
Convert from binary system to denary system

10,000,000 1,000,000 100,000 10,000 1,000 100 10 1

107 106 105 104 103 10² 101 100

8 0 6 9 0 4 5 3

We do in binary system exactly as we do in denary system.


80690453 = 8X107 + 0 + 6X105+ 9X104 + 0 + 4X102 + 5X10 + 3 = 80690453
Learning Objectives
 Convert from binary system to denary system
2- What is a bit?
3- What is a byte?
4- Convert from denary system to binary system
Learning Objective 2:
What is a bit?

• The name "digit" comes from the fact that the ten digits (Latin digiti meaning
fingers) of the hands correspond to the ten symbols of
the common base 10 numeral system, i.e. the decimal (ancient Latin
adjective decem meaning ten) digits.
Digit
Decimal/Denary System:
8 0 6 9 0 4 5 3

Bit
Binary System:
1 0 0 0 1 1 0 1
Learning Objective 2:
What is a bit?
Learning Objective 3:
What is a byte?

A bit:
the smallest increment of data on a computer, can hold only one of two values: 0 or 1, corresponding to the electrical
values of off or on, respectively.
A byte:
8 bits assembled together. A byte contains enough information to store a single ASCII character, like "h".
Bit
Binary System:
1 0 0 0 1 1 0 1

Byte
Challenge yourself
• What is the smallest number in 8 digits in the denary system?
• What is the greatest number in 8 digits in the denary system?
• How many numbers can be put in an 8-digit number in the denary
system?
• What is the smallest number in 8 bits (a byte) in the binary system?
• What is the greatest number in 8 bits (a byte) in the binary system?
• How many numbers can be put in an 8-digit number (a byte) in the
binary system?
• Can you observe and conclude formulas generalized for any number
system (of any base)?
Learning Objectives
 Convert from binary system to denary system
 What is a bit?
 What is a byte?
4- Convert from denary system to binary system
Learning Objective 4:
Convert from denary system to binary system

By subtracting method:
Example:
Convert 125 in decimal (denary) system to binary
Can we get 128 from 125? No. Then the place value of the bit whose place value 128 is 0.
125 – 128? No. ---> 0 , R = 125
125 – 64? Yes. ---> 1 , R = 61
61 - 32? Yes. ---> 1 , R = 29
29 - 16? Yes. ---> 1 , R = 13
13 - 8? Yes. ---> 1 , R = 5
5 - 4? Yes. ---> 1 , R = 1
1 - 2? No. ---> 0 , R = 1
1 - 1? Yes. ---> 1 , R = 0
128 64 32 16 8 4 2 1

0 1 1 1 1 1 0 1
Learning Objective 4:
Convert from denary system to binary system

By division method:
Example:
Convert 125 in decimal (denary) system to binary
Can we get 128 from 125? No. Then the place value of the bit whose place value 128 is 0.
125 / 2? 62. ---> R = 1
62 / 2? 31. ---> R = 0
31 / 2? 15. ---> R = 1
15 / 2? 7. ---> R = 1
7 / 2? 3. ---> R = 1
3 / 2? 1 ---> R = 1
1 / 2? 0 ---> R = 1

128 64 32 16 8 4 2 1

0 1 1 1 1 1 0 1
Which is greater? 256 in decimal or 11111111 in binary?
A) 256 is greater
B) 11111111 is greater
C) Both numbers are equal
Now go check your answer
• https://www.rapidtables.com/convert/number/binary-to-decimal.html
Think about it:

• There are many different numerical


systems same as people. A number
can be displayed in multiple ways.
Further reading

• https://www.mentalfloss.com/article/318
79/12-mind-blowing-number-systems-oth
er-languages
• https://www.frontiersin.org/articles/10.3389/
fpsyg.2013.00480/full
Uses of the hexadecimal system: (// separates alternative answers within a marking
point)
• colour codes // colour in HTML/CSS
• error messages
• locations in memory
• memory dump // debugging
• IP(v6) address
• ASCII // Unicode
• assembly language
• URL

You might also like