SlideShare a Scribd company logo
M. Raihan
Email: rianku11@gmail.com
Data Representation
Part-2
Bit and Byte
21-Aug-17
Bit:
A "bit", like an atom, the smallest unit of storage.
A bit stores just a 0 or 1.
"In the computer it's all 0's and 1's" ... Bits.
In a chip: electric charge = 0/1
In a hard drive: spots of North/South magnetism = 0/1
A bit is too small to be much use.
Group 8 bits together to make 1 byte.
Bit and Byte
21-Aug-17
Byte:
One byte = grouping of 8 bits.
e.g. 0 1 0 1 1 0 1 0
One byte can store one character, e.g. 'A' or 'x' or '$‘
Used to measure data storage.
 For example, a CD holds 700MB (megabytes) of data and a hard
drive may hold 250GB (gigabytes).
Bytes are often used when referring to the size of an electronic file,
such as music, photos and videos.
Decimal to Binary
21-Aug-17
Example: convert (41.6875)10 into a binary number.
Integer part: 41 and fractional part: 0.6875
For integer part: 41
(41)10 = (101001)2
Decimal to Binary (continue)
21-Aug-17
For fractional part: (0.6875)10
Number Base Product Fractional Part Integer Part
0.6875 × 2 = 1.3750 0.3750 1
0.3750 × 2 = 0.7500 0.7500 0
0.7500 × 2 = 1.5000 0.5000 1
0.5000 × 2 = 1.0000 0.0000 1
(0.6875)10 = (.1011)2
Decimal to Binary (continue)
21-Aug-17
Example: convert (41.6875)10 into a binary number.
(41.6875)10 = (101001.1011)2
(41)10 = (101001)2
(0.6875)10 = (1011)2
Decimal to Octal
21-Aug-17
Example: convert (153.513)10 into a octal number.
Integer part: 153
Base Number Remainder
8 153
8 19 1
8 2 3
0 2
(153)10 = (231)8
Decimal to Octal (continue)
21-Aug-17
Example: convert (153.513)10 into a octal number.
Integer part: 0.513
(0.513)10 = (.4065…)8
Number Base Product Fractional Part Integer Part
0.513 × 8 = 4.104 0.104 4
0.104 × 8 = 0.832 0.832 0
0.832 × 8 = 6.656 0.656 6
0.656 × 8 = 5.248 0.248 5
.
.
.
.
.
.
.
.
.
.
.
.
Decimal to Octal (continue)
21-Aug-17
Example: convert (153.513)10 into a octal number.
(153.513)10 = (231.4065….)8
(153)10 = (231)8
(0.513)10 = (.4065….)8
Binary Arithmetic
21-Aug-17
Addition Subtraction Multiplication Division
𝟎 + 𝟎 = 𝟎 𝟎 − 𝟎 = 𝟎 𝟎 × 𝟎 = 𝟎 𝟎 ÷ 𝟎 = 𝒏𝒐 𝒎𝒆𝒂𝒏𝒊𝒏𝒈
𝟎 + 𝟏 = 𝟏 𝟏 − 𝟎 = 𝟏 𝟏 × 𝟎 = 𝟎 𝟏 ÷ 𝟎 = 𝒏𝒐 𝒎𝒆𝒂𝒏𝒊𝒏𝒈
𝟏 + 𝟎 = 𝟏 𝟏 − 𝟏 = 𝟎 𝟎 × 𝟏 = 𝟎 𝟎 ÷ 𝟏 = 𝟎
𝟏 + 𝟏 = 𝟎 𝒄𝒂𝒓𝒓𝒚 𝟏 𝟎 − 𝟏 = 𝟏 𝒃𝒐𝒓𝒓𝒐𝒘 𝟏 𝒆𝒒𝒖𝒂𝒍 𝒕𝒐 𝟏𝟎 𝟏 × 𝟏 = 𝟏 𝟏 ÷ 𝟏 = 𝟏
𝟏 + 𝟏 + 𝟏 = 𝟏 𝒄𝒂𝒓𝒓𝒚 𝟏 - - -
Binary Addition
21-Aug-17
Example: (101)2 + (001)2
101
+ 001
110
Binary Subtraction
21-Aug-17
Example: (10110)2 - (01001)2
10110
- 01001
01101
Complements
21-Aug-17
1’s Complement: 1’s complement of 110101 is 001010.
2’s Complement:
Way 1:
First perform 1’s complement
Add 1 to this to get 2’s complement
(13)10 = 1101 --> 0010
0010+1 = 0011 which is 2’s complement for -13
Way 2:
Scan right to left and complement all bits appearing after the first
appearance of 1
Example : 1010 = 0110
Signed Integers
21-Aug-17
Three methods to represent signed integers,
especially negative integer numbers:
Signed Magnitude Representation
Signed 1’s Complement Representation
Signed 2’s Complement Representation
Signed Magnitude Representation
21-Aug-17
In binary system, the sign of a number is represented using
an extra bit, called sign bit, at the extreme left most position
of the number.
By convention, sign bit 0 is for positive integer and sign bit
1 is for negative integer.
The rest bits represent the magnitude of the number.
Signed Magnitude Representation
21-Aug-17
Example:
(+15)10 = (0,0001111)2 and
(–15)10 = (1,0001111)2
Problem: Zero has two forms,
(0,0000000)2 = (+0)10 and
(1,0000000)2 = (–0)10
Binary Coded Decimal (BCD)
21-Aug-17
Using straight binary coding: a decimal number is
represented by its equivalent binary number.
BCD is a weighted code, each bit is assigned a weight.
From left to right the weights are 8, 4, 2 and 1. This is
known as 8–4–2–1 BCD.
As the highest decimal digit 9 requires 4-bits in binary
(i.e., 1001); each decimal digit is represented using a 4-
bit binary equivalent.
BCD
21-Aug-17
To convert a decimal number
to its BCD equivalent, just the
4-bits coded value is used for
each decimal digit.
Example: (1972)10 equals
(0001 1001 0111 0010)BCD
Decimal Digit
BCD
8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
BCD (continue)
21-Aug-17
To convert a BCD number to
its decimal equivalent, all bits
are to be divided into groups of
4 bits. Then corresponding
decimal is replaced.
Example: (10101.1)BCD
= (0001 0101 . 1000)BCD
= (15.8)10
Decimal Digit
BCD
8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Binary Coded Decimal (BCD)
21-Aug-17
Advantages:
BCD system saves the efforts of conversion. Conversion from
decimal numbers to binary number system requires more
computation.
There is no round off error in BCD representation, but there
may be in straight binary conversion.
BCD system is easier to user, as generally user provides input in
decimal form and expects results also in decimal form.
Binary Coded Decimal (BCD)
21-Aug-17
Disadvantages:
It takes more digits in BCD system than straight binary coding.
For example, (1023)10 requires 16 bits in BCD,
(0001000000100011)BCD; where binary coding takes 9 bits
(111111111)2 .
Performing arithmetic operations with straight binary coding is
easier than the BCD coding.
Circuits required for BCD arithmetic operations are more
complex than those of binary circuits.
BCD system requires more time in executing numeric
computation.
Thank You
21-Aug-17

More Related Content

What's hot

multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
malikwaqar75033149
 
09 binary number systems
09   binary number systems09   binary number systems
09 binary number systems
Lee Chadwick
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
AmrutaMehata
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
AmrutaMehata
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
Dr. Anita Goel
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
Darshan Marjadi
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
Sanjeev Patel
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
Sanjeev Patel
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
Dr. Ajay Kumar Singh
 

What's hot (9)

multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
09 binary number systems
09   binary number systems09   binary number systems
09 binary number systems
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
BASIC COMPUTER ORGANIZATION AND DESIGN
BASIC  COMPUTER  ORGANIZATION  AND  DESIGNBASIC  COMPUTER  ORGANIZATION  AND  DESIGN
BASIC COMPUTER ORGANIZATION AND DESIGN
 

Similar to Lecture 8

W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
W 9 numbering systemW 9 numbering system
Int 2 data representation 2010
Int 2 data representation 2010Int 2 data representation 2010
Int 2 data representation 2010
iarthur
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representation
iarthur
 
Network Slides
Network SlidesNetwork Slides
Network Slides
iarthur
 
DESIGN OF COMBINATIONAL LOGIC
DESIGN OF COMBINATIONAL LOGICDESIGN OF COMBINATIONAL LOGIC
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.pptUnit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
ChiragSuresh
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
lionking
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
UzairAhmadWalana
 
Okkkkk
OkkkkkOkkkkk
Chapter 2.ppt
Chapter 2.pptChapter 2.ppt
Chapter 2.ppt
NMohd3
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdf
RameshK531901
 
Number system
Number systemNumber system
Number system
Bikash Kumar
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
Susantha Herath
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
sohag sikder
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
Er. Nawaraj Bhandari
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Comprator
suraj829
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
David Louie Bedia
 
1.1.1 binary systems By Zak
1.1.1 binary systems By Zak1.1.1 binary systems By Zak
1.1.1 binary systems By Zak
Tabsheer Hasan
 

Similar to Lecture 8 (20)

W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
Int 2 data representation 2010
Int 2 data representation 2010Int 2 data representation 2010
Int 2 data representation 2010
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representation
 
Network Slides
Network SlidesNetwork Slides
Network Slides
 
DESIGN OF COMBINATIONAL LOGIC
DESIGN OF COMBINATIONAL LOGICDESIGN OF COMBINATIONAL LOGIC
DESIGN OF COMBINATIONAL LOGIC
 
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.pptUnit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
 
Logic Design 2009
Logic Design 2009Logic Design 2009
Logic Design 2009
 
DLD-Introduction.pptx
DLD-Introduction.pptxDLD-Introduction.pptx
DLD-Introduction.pptx
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Chapter 2.ppt
Chapter 2.pptChapter 2.ppt
Chapter 2.ppt
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdf
 
Number system
Number systemNumber system
Number system
 
Number systems and conversions
Number systems and conversionsNumber systems and conversions
Number systems and conversions
 
Cit 1101 lec 02
Cit 1101 lec 02Cit 1101 lec 02
Cit 1101 lec 02
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Comprator
 
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
 
1.1.1 binary systems By Zak
1.1.1 binary systems By Zak1.1.1 binary systems By Zak
1.1.1 binary systems By Zak
 

More from M. Raihan

Lecture 7
Lecture 7Lecture 7
Lecture 7
M. Raihan
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
M. Raihan
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
M. Raihan
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
M. Raihan
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
M. Raihan
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
M. Raihan
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
M. Raihan
 
Amplifiers and biopotential amplifiers new
Amplifiers and biopotential amplifiers newAmplifiers and biopotential amplifiers new
Amplifiers and biopotential amplifiers new
M. Raihan
 
Comparison of fnir with other neuroimaging modalities relation between eeg sy...
Comparison of fnir with other neuroimaging modalities relation between eeg sy...Comparison of fnir with other neuroimaging modalities relation between eeg sy...
Comparison of fnir with other neuroimaging modalities relation between eeg sy...
M. Raihan
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
M. Raihan
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
M. Raihan
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
M. Raihan
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
M. Raihan
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
M. Raihan
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
M. Raihan
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
M. Raihan
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
M. Raihan
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
M. Raihan
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
M. Raihan
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
M. Raihan
 

More from M. Raihan (20)

Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Amplifiers and biopotential amplifiers new
Amplifiers and biopotential amplifiers newAmplifiers and biopotential amplifiers new
Amplifiers and biopotential amplifiers new
 
Comparison of fnir with other neuroimaging modalities relation between eeg sy...
Comparison of fnir with other neuroimaging modalities relation between eeg sy...Comparison of fnir with other neuroimaging modalities relation between eeg sy...
Comparison of fnir with other neuroimaging modalities relation between eeg sy...
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 18
Lecture 18Lecture 18
Lecture 18
 
Lecture 17
Lecture 17Lecture 17
Lecture 17
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 15
Lecture 15Lecture 15
Lecture 15
 

Recently uploaded

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.
 
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
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
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
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
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
 
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
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
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
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
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
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 

Recently uploaded (20)

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
 
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
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
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
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
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
 
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...
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
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
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
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
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 

Lecture 8

  • 3. Bit and Byte 21-Aug-17 Bit: A "bit", like an atom, the smallest unit of storage. A bit stores just a 0 or 1. "In the computer it's all 0's and 1's" ... Bits. In a chip: electric charge = 0/1 In a hard drive: spots of North/South magnetism = 0/1 A bit is too small to be much use. Group 8 bits together to make 1 byte.
  • 4. Bit and Byte 21-Aug-17 Byte: One byte = grouping of 8 bits. e.g. 0 1 0 1 1 0 1 0 One byte can store one character, e.g. 'A' or 'x' or '$‘ Used to measure data storage.  For example, a CD holds 700MB (megabytes) of data and a hard drive may hold 250GB (gigabytes). Bytes are often used when referring to the size of an electronic file, such as music, photos and videos.
  • 5. Decimal to Binary 21-Aug-17 Example: convert (41.6875)10 into a binary number. Integer part: 41 and fractional part: 0.6875 For integer part: 41 (41)10 = (101001)2
  • 6. Decimal to Binary (continue) 21-Aug-17 For fractional part: (0.6875)10 Number Base Product Fractional Part Integer Part 0.6875 × 2 = 1.3750 0.3750 1 0.3750 × 2 = 0.7500 0.7500 0 0.7500 × 2 = 1.5000 0.5000 1 0.5000 × 2 = 1.0000 0.0000 1 (0.6875)10 = (.1011)2
  • 7. Decimal to Binary (continue) 21-Aug-17 Example: convert (41.6875)10 into a binary number. (41.6875)10 = (101001.1011)2 (41)10 = (101001)2 (0.6875)10 = (1011)2
  • 8. Decimal to Octal 21-Aug-17 Example: convert (153.513)10 into a octal number. Integer part: 153 Base Number Remainder 8 153 8 19 1 8 2 3 0 2 (153)10 = (231)8
  • 9. Decimal to Octal (continue) 21-Aug-17 Example: convert (153.513)10 into a octal number. Integer part: 0.513 (0.513)10 = (.4065…)8 Number Base Product Fractional Part Integer Part 0.513 × 8 = 4.104 0.104 4 0.104 × 8 = 0.832 0.832 0 0.832 × 8 = 6.656 0.656 6 0.656 × 8 = 5.248 0.248 5 . . . . . . . . . . . .
  • 10. Decimal to Octal (continue) 21-Aug-17 Example: convert (153.513)10 into a octal number. (153.513)10 = (231.4065….)8 (153)10 = (231)8 (0.513)10 = (.4065….)8
  • 11. Binary Arithmetic 21-Aug-17 Addition Subtraction Multiplication Division 𝟎 + 𝟎 = 𝟎 𝟎 − 𝟎 = 𝟎 𝟎 × 𝟎 = 𝟎 𝟎 ÷ 𝟎 = 𝒏𝒐 𝒎𝒆𝒂𝒏𝒊𝒏𝒈 𝟎 + 𝟏 = 𝟏 𝟏 − 𝟎 = 𝟏 𝟏 × 𝟎 = 𝟎 𝟏 ÷ 𝟎 = 𝒏𝒐 𝒎𝒆𝒂𝒏𝒊𝒏𝒈 𝟏 + 𝟎 = 𝟏 𝟏 − 𝟏 = 𝟎 𝟎 × 𝟏 = 𝟎 𝟎 ÷ 𝟏 = 𝟎 𝟏 + 𝟏 = 𝟎 𝒄𝒂𝒓𝒓𝒚 𝟏 𝟎 − 𝟏 = 𝟏 𝒃𝒐𝒓𝒓𝒐𝒘 𝟏 𝒆𝒒𝒖𝒂𝒍 𝒕𝒐 𝟏𝟎 𝟏 × 𝟏 = 𝟏 𝟏 ÷ 𝟏 = 𝟏 𝟏 + 𝟏 + 𝟏 = 𝟏 𝒄𝒂𝒓𝒓𝒚 𝟏 - - -
  • 13. Binary Subtraction 21-Aug-17 Example: (10110)2 - (01001)2 10110 - 01001 01101
  • 14. Complements 21-Aug-17 1’s Complement: 1’s complement of 110101 is 001010. 2’s Complement: Way 1: First perform 1’s complement Add 1 to this to get 2’s complement (13)10 = 1101 --> 0010 0010+1 = 0011 which is 2’s complement for -13 Way 2: Scan right to left and complement all bits appearing after the first appearance of 1 Example : 1010 = 0110
  • 15. Signed Integers 21-Aug-17 Three methods to represent signed integers, especially negative integer numbers: Signed Magnitude Representation Signed 1’s Complement Representation Signed 2’s Complement Representation
  • 16. Signed Magnitude Representation 21-Aug-17 In binary system, the sign of a number is represented using an extra bit, called sign bit, at the extreme left most position of the number. By convention, sign bit 0 is for positive integer and sign bit 1 is for negative integer. The rest bits represent the magnitude of the number.
  • 17. Signed Magnitude Representation 21-Aug-17 Example: (+15)10 = (0,0001111)2 and (–15)10 = (1,0001111)2 Problem: Zero has two forms, (0,0000000)2 = (+0)10 and (1,0000000)2 = (–0)10
  • 18. Binary Coded Decimal (BCD) 21-Aug-17 Using straight binary coding: a decimal number is represented by its equivalent binary number. BCD is a weighted code, each bit is assigned a weight. From left to right the weights are 8, 4, 2 and 1. This is known as 8–4–2–1 BCD. As the highest decimal digit 9 requires 4-bits in binary (i.e., 1001); each decimal digit is represented using a 4- bit binary equivalent.
  • 19. BCD 21-Aug-17 To convert a decimal number to its BCD equivalent, just the 4-bits coded value is used for each decimal digit. Example: (1972)10 equals (0001 1001 0111 0010)BCD Decimal Digit BCD 8 4 2 1 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1
  • 20. BCD (continue) 21-Aug-17 To convert a BCD number to its decimal equivalent, all bits are to be divided into groups of 4 bits. Then corresponding decimal is replaced. Example: (10101.1)BCD = (0001 0101 . 1000)BCD = (15.8)10 Decimal Digit BCD 8 4 2 1 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1
  • 21. Binary Coded Decimal (BCD) 21-Aug-17 Advantages: BCD system saves the efforts of conversion. Conversion from decimal numbers to binary number system requires more computation. There is no round off error in BCD representation, but there may be in straight binary conversion. BCD system is easier to user, as generally user provides input in decimal form and expects results also in decimal form.
  • 22. Binary Coded Decimal (BCD) 21-Aug-17 Disadvantages: It takes more digits in BCD system than straight binary coding. For example, (1023)10 requires 16 bits in BCD, (0001000000100011)BCD; where binary coding takes 9 bits (111111111)2 . Performing arithmetic operations with straight binary coding is easier than the BCD coding. Circuits required for BCD arithmetic operations are more complex than those of binary circuits. BCD system requires more time in executing numeric computation.