SlideShare a Scribd company logo
1 of 18
THE BINARY NUMBER
SYSTEM
CSE 1110: Introduction to Computer Systems
Course teacher: Minhajul Bashir
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 1
WHY BINARY?
Major computer components (CPU, RAM etc.) are made of transistors
A transistor is an electronic switch
 Has two states – on (1) and off (0)
This is why a computer understands the language of 1’s and 0’s only
 Binary number system
Every instruction of a computer is encoded in binary
Every data is also encoded in binary
Computer stores and manipulates these data in binary format
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 2
BINARY NUMBER SYSTEM
Two digits to represent every number – 0 (zero) and
1 (one)
 Known as bits
8 bits together – a byte
A number of bytes together – a word
 Usually 4 or 8 bytes, depending on the processor, computer
architecture etc.
More units – kilobytes, megabytes, gigabytes,
terabytes, …
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 3
0 0
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
16 10000
COMPUTER STORES
DATA IN
ITS BINARY FORM
Let’s see how a number is stored in its binary format
PART 1: CONVERT A DECIMAL
INTEGER TO BINARY
1. Divide the number by 2
2. Store the quotient and remainder
3. Let the quotient be the new number
4. Repeat steps 1 to 3 until the number is 0
5. Write down the remainders from last to first. That will be the
binary format
EXAMPLE: CONVERT 154 10
TO BINARY
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 6
154
2
77 0
2
Quotient Remainder
38 1
2
19 0
2
9 1
2
4 1
2
2 0
2
1 0
2
0 1
154 10 = 10011010 2
PART 2: CONVERT A PROPER
FRACTION TO BINARY
1. Multiply the number by 2
2. Separate the integer and the fraction parts
3. Let the fraction part be the new number
4. Repeat steps 1 to 3 until the number is 0
5. Write down the integer parts from first to last after the binary
point. This will be the binary representation
EXAMPLE: CONVERT 0.625 10
TO BINARY
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 8
Integer Fraction
- .625
x2
1 .250
x2
0 .500
x2
1 .000
0.625 10 = 0.101 2
HOW TO CONVERT
IMPROPER FRACTIONS?
To convert 154.625 10 to binary –
 Divide the number into integer and fraction part, i.e. 154 10 and 0.625 10
 Convert them individually to binary
 Join them up
154.625 10 = 10011010.101 2
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 9
REVERSE ACTION: BINARY
TO DECIMAL
Multiply each bit with the place value of its place value, and sum the
results
Place values –
𝟐𝟔
𝟐𝟓 𝟐𝟒 𝟐𝟑 𝟐𝟐 𝟐𝟏 𝟐𝟎
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 10
𝟐−𝟏 𝟐−𝟐 𝟐−𝟑
𝟐−𝟒
REVERSE ACTION: BINARY
TO DECIMAL
10011010.101 2
= 1 × 27
+ 0 × 26
+ 0 × 25
+ 1 × 24
+ 1 × 23
+ 0 × 22
+ 1 × 21
+ 0 × 20
+ 1 ×
2−1
+ 0 × 2−2
+ 1 × 2−3
= 128 + 0 + 0 + 16 + 8 + 0 + 2 + 0 + 0.5 + 0 + 0.125
= 154.625 10
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 11
COMPUTER
MANIPULATES DATA IN
ITS BINARY FORM
Let’s see a basic manipulation example
ADDING TWO BINARY
NUMBERS
0101 + 0111 = 1100
0101 + 1011 = 10000
0111 + 0011 = 1010
How is it done?
 Watch carefully …
ADDING TWO BINARY
NUMBERS
1101011
+101110
=====
==
10011001
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 14
1
1
1
1
+
0
1
1
0
1
0
0
1
1
1
1
1
1
0
1
0
1
1
0
1
0
1
IMPLEMENTING THE
MANIPULATIONS IN
CIRCUITS: BOOLEAN
OPERATIONS
Every manipulation is a combination of three basic operations
 Called the Boolean operations, by the name of George Bool
Three Boolean operations
 Logical addition (OR)
 Logical multiplication (AND)
 Inversion (NOT)
These operations are implemented using logic gates
 Gates take one or more bits as inputs, and give one bit an output, according to the
operations
LOGIC GATES
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 16
BOOLEAN OPERATIONS
OR
𝐴 𝐵 𝐴 + 𝐵
0 0 0
0 1 1
1 0 1
1 1 1
AND
𝐴 𝐵 𝐴𝐵
0 0 0
0 1 0
1 0 0
1 1 1
NOT
𝐴 𝐴′
0 1
1 0
WHAT WILL BE THE OUTPUT
OF THIS CIRCUIT?
12/20/2022 MINHAJUL@CSE.UIU.AC.BD 18
A = 1
B = 0
C = 1
(AB)’
(B+C)BC

More Related Content

Similar to 02-binary.pptx

Similar to 02-binary.pptx (20)

Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Bcd
BcdBcd
Bcd
 
CO for classroom observation presentation
CO for classroom observation presentationCO for classroom observation presentation
CO for classroom observation presentation
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy
1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy
1. NUMBER SYSTEM.pptx Computer Applications in Pharmacy
 
Alu1
Alu1Alu1
Alu1
 
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
 
Dpsd lecture-notes
Dpsd lecture-notesDpsd lecture-notes
Dpsd lecture-notes
 
Number Systems.pptx
Number Systems.pptxNumber Systems.pptx
Number Systems.pptx
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
binary arithmetic conversion.pptx
binary arithmetic conversion.pptxbinary arithmetic conversion.pptx
binary arithmetic conversion.pptx
 
Data representation
Data representationData representation
Data representation
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
 
NUMBER BASE SYSTEM.pptx
NUMBER BASE SYSTEM.pptxNUMBER BASE SYSTEM.pptx
NUMBER BASE SYSTEM.pptx
 
Ncp computer appls num sys2 pramod
Ncp computer appls  num sys2 pramodNcp computer appls  num sys2 pramod
Ncp computer appls num sys2 pramod
 

Recently uploaded

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Recently uploaded (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

02-binary.pptx

  • 1. THE BINARY NUMBER SYSTEM CSE 1110: Introduction to Computer Systems Course teacher: Minhajul Bashir 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 1
  • 2. WHY BINARY? Major computer components (CPU, RAM etc.) are made of transistors A transistor is an electronic switch  Has two states – on (1) and off (0) This is why a computer understands the language of 1’s and 0’s only  Binary number system Every instruction of a computer is encoded in binary Every data is also encoded in binary Computer stores and manipulates these data in binary format 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 2
  • 3. BINARY NUMBER SYSTEM Two digits to represent every number – 0 (zero) and 1 (one)  Known as bits 8 bits together – a byte A number of bytes together – a word  Usually 4 or 8 bytes, depending on the processor, computer architecture etc. More units – kilobytes, megabytes, gigabytes, terabytes, … 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 3 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 16 10000
  • 4. COMPUTER STORES DATA IN ITS BINARY FORM Let’s see how a number is stored in its binary format
  • 5. PART 1: CONVERT A DECIMAL INTEGER TO BINARY 1. Divide the number by 2 2. Store the quotient and remainder 3. Let the quotient be the new number 4. Repeat steps 1 to 3 until the number is 0 5. Write down the remainders from last to first. That will be the binary format
  • 6. EXAMPLE: CONVERT 154 10 TO BINARY 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 6 154 2 77 0 2 Quotient Remainder 38 1 2 19 0 2 9 1 2 4 1 2 2 0 2 1 0 2 0 1 154 10 = 10011010 2
  • 7. PART 2: CONVERT A PROPER FRACTION TO BINARY 1. Multiply the number by 2 2. Separate the integer and the fraction parts 3. Let the fraction part be the new number 4. Repeat steps 1 to 3 until the number is 0 5. Write down the integer parts from first to last after the binary point. This will be the binary representation
  • 8. EXAMPLE: CONVERT 0.625 10 TO BINARY 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 8 Integer Fraction - .625 x2 1 .250 x2 0 .500 x2 1 .000 0.625 10 = 0.101 2
  • 9. HOW TO CONVERT IMPROPER FRACTIONS? To convert 154.625 10 to binary –  Divide the number into integer and fraction part, i.e. 154 10 and 0.625 10  Convert them individually to binary  Join them up 154.625 10 = 10011010.101 2 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 9
  • 10. REVERSE ACTION: BINARY TO DECIMAL Multiply each bit with the place value of its place value, and sum the results Place values – 𝟐𝟔 𝟐𝟓 𝟐𝟒 𝟐𝟑 𝟐𝟐 𝟐𝟏 𝟐𝟎 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 10 𝟐−𝟏 𝟐−𝟐 𝟐−𝟑 𝟐−𝟒
  • 11. REVERSE ACTION: BINARY TO DECIMAL 10011010.101 2 = 1 × 27 + 0 × 26 + 0 × 25 + 1 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 0 × 20 + 1 × 2−1 + 0 × 2−2 + 1 × 2−3 = 128 + 0 + 0 + 16 + 8 + 0 + 2 + 0 + 0.5 + 0 + 0.125 = 154.625 10 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 11
  • 12. COMPUTER MANIPULATES DATA IN ITS BINARY FORM Let’s see a basic manipulation example
  • 13. ADDING TWO BINARY NUMBERS 0101 + 0111 = 1100 0101 + 1011 = 10000 0111 + 0011 = 1010 How is it done?  Watch carefully …
  • 14. ADDING TWO BINARY NUMBERS 1101011 +101110 ===== == 10011001 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 14 1 1 1 1 + 0 1 1 0 1 0 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1
  • 15. IMPLEMENTING THE MANIPULATIONS IN CIRCUITS: BOOLEAN OPERATIONS Every manipulation is a combination of three basic operations  Called the Boolean operations, by the name of George Bool Three Boolean operations  Logical addition (OR)  Logical multiplication (AND)  Inversion (NOT) These operations are implemented using logic gates  Gates take one or more bits as inputs, and give one bit an output, according to the operations
  • 17. BOOLEAN OPERATIONS OR 𝐴 𝐵 𝐴 + 𝐵 0 0 0 0 1 1 1 0 1 1 1 1 AND 𝐴 𝐵 𝐴𝐵 0 0 0 0 1 0 1 0 0 1 1 1 NOT 𝐴 𝐴′ 0 1 1 0
  • 18. WHAT WILL BE THE OUTPUT OF THIS CIRCUIT? 12/20/2022 MINHAJUL@CSE.UIU.AC.BD 18 A = 1 B = 0 C = 1 (AB)’ (B+C)BC