SlideShare a Scribd company logo
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

Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
Laguna State Polytechnic University
 
Bcd
BcdBcd
CO for classroom observation presentation
CO for classroom observation presentationCO for classroom observation presentation
CO for classroom observation presentation
chricylmaeleganad
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
Meenakshi Paul
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
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
Vedika Narvekar
 
Alu1
Alu1Alu1
DCF QNA edited
DCF QNA editedDCF QNA edited
DCF QNA edited
Emmanuel Eniola Falade
 
Dpsd lecture-notes
Dpsd lecture-notesDpsd lecture-notes
Dpsd lecture-notes
AVC College of Engineering
 
Number Systems.pptx
Number Systems.pptxNumber Systems.pptx
Number Systems.pptx
UMAMAHESWARIHSNSCT
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
ececourse
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
sohag sikder
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
AminaZahid16
 
binary arithmetic conversion.pptx
binary arithmetic conversion.pptxbinary arithmetic conversion.pptx
binary arithmetic conversion.pptx
JayVadgama9
 
Data representation
Data representationData representation
Data representation
Chew Hoong
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
amudhak10
 
CA UNIT II.pptx
CA UNIT II.pptxCA UNIT II.pptx
CA UNIT II.pptx
ssuser9dbd7e
 
NUMBER BASE SYSTEM.pptx
NUMBER BASE SYSTEM.pptxNUMBER BASE SYSTEM.pptx
NUMBER BASE SYSTEM.pptx
OsenagaAirewele
 
Ncp computer appls num sys2 pramod
Ncp computer appls  num sys2 pramodNcp computer appls  num sys2 pramod
Ncp computer appls num sys2 pramod
NCP
 

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

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Leena Ghag-Sakpal
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
 

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