SlideShare a Scribd company logo
1 of 35
DIGITAL LOGIC DESIGN
LECTURE 03
BY-FARHAT ULLAH
SIGNED AND UNSIGNED
NUMBERS
Unsigned Binary Numbers
Signed Binary Numbers
Most significant bit represents sign
0 represents a positive number
1 represents a negative number
2’S COMPLEMENT FORM
1’s complement form
2’s complement form
Binary number 01101 (13)
1’s complement 10010
+ 1
2’s complement 10011 (-13)
ADDITION AND SUBTRACTION
WITH 2’S COMPLEMENT
0101 +5 0101 +5
0010 +2 1110 -2
0111 +7 0011 +3
1011 -5 1011 -5
1110 -2 0010 +2
1001 -7 1101 -3
RANGE OF NUMBERS
Maximum Range
Number of digits
Decimal number example
Binary number example
Overflow
RANGE OF BINARY NUMBERS
Decimal
Number
Sign Magnitude
2n-1, 2n-1 -1
2’s Complement
2n-1, 2n-1 -1
Unsigned
2n, 2n - 1
0 0000 0000 000
1 0001 0001 001
2 0010 0010 010
3 0011 0011 011
4 0100 0100 100
5 0101 0101 101
6 0110 0110 110
7 0111 0111 111
RANGE OF BINARY NUMBERS
Decimal
Number
Sign Magnitude
2n-1-1, -(2n-1 -1)
2’s Complement
2n-1, -2n-1
Unsigned
-8 1000
-7 1111 1001
-6 1110 1010
-5 1101 1011
-4 1100 1100
-3 1011 1101
-2 1010 1110
-1 1001 1111
RANGE OF NUMBERS
Unsigned
 Positive Numbers Only (0 to 7)
 3-bit
Signed Magnitude
 Positive & Negative Numbers (-7 to 7)
 4-bit
2’s Complement
 Positive & Negative Numbers (-8 to 7)
 4-bit
RANGE & OVERFLOW
2 + 7 using 3-bit unsigned binary?
9 overflow?
2 – 7?
Can not represent -7 in unsigned binary
RANGE AND OVERFLOW
1011 -5
1101 -3
11000 -8
1011 -5 0101
+5
1100 -4 0100 +4
10111 -9 1001 +9
OCTAL NUMBER SYSTEM
Base 8
0, 1, 2, 3, 4, 5, 6, 7
Representing Binary in compact form
11011000001102 = 154068
COUNTING IN OCTAL
Decimal Binary Octal
0 000 0
1 001 1
2 010 2
3 011 3
4 100 4
5 101 5
6 110 6
7 111 7
COUNTING IN OCTAL
Decimal Octal Decimal Octal Decimal Octal
8 10 16 20 24 30
9 11 17 21 25 31
10 12 18 22 26 32
11 13 19 23 27 33
12 14 20 24 28 34
13 15 21 25 29 35
14 16 22 26 30 36
15 17 23 27 31 37
BINARY-OCTAL
CONVERSION
Binary to Octal Conversion
11010110101110010110
011 010 110 101 110 010 110
3 2 6 5 6 2 6
Octal to Binary Conversion
1726
001 111 010 110
DECIMAL-OCTAL CONVERSION
Decimal to Octal Conversion
Indirect Method
Decimal →Binary → Octal
Repeated Division by 8
Octal to Decimal Conversion
Indirect Method
Octal →Binary → Decimal
Sum-of-Weights
REPEATED DIVISION BY 8
Number Quotient Remainder
2075 259 3 (O0)
259 32 3 (O1)
32 4 0 (O2)
4 0 4 (O3)
SUM-OF-WEIGHTS
4033
(4 x 83) + (0 x 82) + (3 x 81) +
(3 x 80)
(4 x 512) + (0 x 64) + (3 x 8) +
(3 x 1)
2048 + 0 + 24 + 3
2075
OCTAL ADDITION
Carry 1
7602 2+1=3d 3O
+ 5771 0+7=7d 7O
15573 6+7=13d 15O
1+7+5=13d 15O
OCTAL SUBTRACTION
Borro 11
7602 2-1=1d
1O
- 5771 8-7=1d
1O
1611 13-
7=6d 6O
6-5=1d 1O
HEXADECIMAL NUMBER
SYSTEM
Base 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Representing Binary in compact form
11011000001102 = 1B06 H
COUNTING IN HEXADECIMAL
Decimal Binary Hexadecimal Decimal Binary Hexadecimal
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F
COUNTING IN HEXADECIMAL
Decimal Hexa-
Decimal
Decimal Hexa-
Decimal
Decimal Hexa-
Decimal
16 10 24 18 32 20
17 11 25 19 33 21
18 12 26 1A 34 22
19 13 27 1B 35 23
20 14 28 1C 36 24
21 15 29 1D 37 25
22 16 30 1E 38 26
23 17 31 1F 39 27
BINARY-HEXADECIMAL
CONVERSION
Binary to Hexadecimal Conversion
11010110101110010110
1101 0110 1011 1001 0110
D 6 B 9 6
Hexadecimal to Binary
Conversion
FD13
1111 1101 0001 0011
DECIMAL-HEXADECIMAL
CONVERSION
Decimal to Hexadecimal Conversion
Indirect Method
Decimal →Binary → Hexadecimal
Repeated Division by 16
Hexadecimal to Decimal Conversion
Indirect Method
Hexadecimal →Binary → Decimal
Sum-of-Weights
REPEATED DIVISION BY 16
Number Quotient Remainder
2096 131 0
131 8 3
8 0 8
SUM-OF-WEIGHTS
CA02
(C x 163) + (A x 162) + (0 x 161) + (2 x
160)
(12 x 163) + (10 x 162) + (0 x 161) + (2 x
160)
(12 x 4096) + (10 x 256) + (0 x 16) + (2
x 1)
49152 + 2560 + 0 + 2
51714
HEXADECIMAL ADDITION
Carry 1
2AC6 6+5=11d Bh
+ 92B5 C+B=23d 17h
BD7B A+2+1=13d Dh
2+9=11d Bh
HEXADECIMAL
SUBTRACTION
Borrow 111
92B5 21-6=15d Fh
- 2AC6 26-C=14d Eh
67EF 17-A=7d 7h
8-2=6d 6h
ALTERNATE REPRESENTATIONS
BCD (Binary Coded Decimal) Code
Decimal BCD Decimal BCD
0 0000 5 0101
1 0001 6 0110
2 0010 7 0111
3 0011 8 1000
4 0100 9 1001
BCD ADDITION
Multi-digit BCD numbers can be added
together
23 0010 0011
45 0100 0101
68 0110 1000
23 0010 0011
48 0100 1000
71 0110 1011
1011 is illegal BCD number
BCD ADDITION
Add a 0110 (6) to an invalid BCD number
Carry added to the most significant BCD
digit
23 0010 0011
48 0100 1000
71 0110 1011
0110
0111 0001
ALPHANUMERIC CODE
Numbers, Characters, Symbols
ASCII 7-bit Code
American Standard Code for Information
Interchange
10 Numbers (0-9)
26 Lower Case Characters (a-z)
26 Upper Case Characters (A-Z)
Punctuation and Symbols
32 Control Characters
ASCII CODE
Numbers 0 to 9
ASCII 0110000 (30h) to 0111001 (39h)
Alphabets a to z
ASCII 1100001 (61h) to 1111010 (7Ah)
Alphabets A to Z
ASCII 1000001 (41h) to 1011010 (5Ah)
Control Characters
ASCII 0000000 (0h) to 0011111 (1Fh)
ERROR DETECTION
Digital Systems are very Reliable
Errors during storage or transmission
Parity Bit
Even Parity
Odd Parity
ODD PARITY ERROR
DETECTION
Original data 10011010
With Odd Parity 110011010
1-bit error 110111010
Number of 1s even indicates 1-bit error
2-bit error 110110010
Number of 1s odd no error indicated
3-bit error 100110010
Number of 1s even indicates error

More Related Content

What's hot

PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)Fizaril Amzari Omar
 
PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018Fizaril Amzari Omar
 
Systems of Counting
Systems of CountingSystems of Counting
Systems of Countingadil raja
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsImran Waris
 
Binary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwBinary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwJoji Thompson
 
Quine mccluskey method
Quine mccluskey methodQuine mccluskey method
Quine mccluskey methodKanmani R
 
Teoría y problemas de sumatorias i PS15 ccesa007
Teoría y problemas de sumatorias i  PS15 ccesa007Teoría y problemas de sumatorias i  PS15 ccesa007
Teoría y problemas de sumatorias i PS15 ccesa007Demetrio Ccesa Rayme
 
Ncp computer appls num sys2 pramod
Ncp computer appls  num sys2 pramodNcp computer appls  num sys2 pramod
Ncp computer appls num sys2 pramodNCP
 
Numbersystemcont
NumbersystemcontNumbersystemcont
NumbersystemcontSajib
 
Decimal vs binary
Decimal vs binaryDecimal vs binary
Decimal vs binaryselcukca84
 
Teoría y problemas de Sumatorias I PS15 ccesa007
Teoría y problemas de Sumatorias I  PS15 ccesa007Teoría y problemas de Sumatorias I  PS15 ccesa007
Teoría y problemas de Sumatorias I PS15 ccesa007Demetrio Ccesa Rayme
 
Digital Principles-Number systems
Digital Principles-Number systemsDigital Principles-Number systems
Digital Principles-Number systemschandkec
 
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"Ra'Fat Al-Msie'deen
 

What's hot (19)

1
11
1
 
Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1Slide03 Number System and Operations Part 1
Slide03 Number System and Operations Part 1
 
Cse
CseCse
Cse
 
PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)PDT DC015 Chapter 2 Computer System 2017/2018 (d)
PDT DC015 Chapter 2 Computer System 2017/2018 (d)
 
PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018PST SC015 Chapter 2 Computer System 2017/2018
PST SC015 Chapter 2 Computer System 2017/2018
 
Systems of Counting
Systems of CountingSystems of Counting
Systems of Counting
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
 
Binary Mathematics Classwork and Hw
Binary Mathematics Classwork and HwBinary Mathematics Classwork and Hw
Binary Mathematics Classwork and Hw
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Mba ebooks
Mba ebooksMba ebooks
Mba ebooks
 
Quine mccluskey method
Quine mccluskey methodQuine mccluskey method
Quine mccluskey method
 
3 number systems
3 number systems3 number systems
3 number systems
 
Teoría y problemas de sumatorias i PS15 ccesa007
Teoría y problemas de sumatorias i  PS15 ccesa007Teoría y problemas de sumatorias i  PS15 ccesa007
Teoría y problemas de sumatorias i PS15 ccesa007
 
Ncp computer appls num sys2 pramod
Ncp computer appls  num sys2 pramodNcp computer appls  num sys2 pramod
Ncp computer appls num sys2 pramod
 
Numbersystemcont
NumbersystemcontNumbersystemcont
Numbersystemcont
 
Decimal vs binary
Decimal vs binaryDecimal vs binary
Decimal vs binary
 
Teoría y problemas de Sumatorias I PS15 ccesa007
Teoría y problemas de Sumatorias I  PS15 ccesa007Teoría y problemas de Sumatorias I  PS15 ccesa007
Teoría y problemas de Sumatorias I PS15 ccesa007
 
Digital Principles-Number systems
Digital Principles-Number systemsDigital Principles-Number systems
Digital Principles-Number systems
 
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"Logic Circuits Design - "Chapter 1: Digital Systems and Information"
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
 

Similar to Digital logic design lecture 03

Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptxAminaZahid16
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptssuser52a19e
 
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalUtkirjonUbaydullaev1
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptRAJKUMARP63
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.pptRabiaAsif31
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdfRameshK531901
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpuWan Afirah
 
Digital logic design lecture 01
Digital logic design   lecture 01Digital logic design   lecture 01
Digital logic design lecture 01FarhatUllah27
 
Video lectures
Video lecturesVideo lectures
Video lecturesEdhole.com
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersMohammad Bashartullah
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptxsulekhasaxena2
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxSurendra Loya
 
Decimal arithematic operation
Decimal arithematic operationDecimal arithematic operation
Decimal arithematic operationPadmapriyaG
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in indiaEdhole.com
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Frankie Jones
 

Similar to Digital logic design lecture 03 (20)

Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
binary-numbers.ppt
binary-numbers.pptbinary-numbers.ppt
binary-numbers.ppt
 
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and Hexadecimal
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
Bolum1cozumler
Bolum1cozumlerBolum1cozumler
Bolum1cozumler
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdf
 
2.1 data represent on cpu
2.1 data represent on cpu2.1 data represent on cpu
2.1 data represent on cpu
 
Digital logic design lecture 01
Digital logic design   lecture 01Digital logic design   lecture 01
Digital logic design lecture 01
 
Video lectures
Video lecturesVideo lectures
Video lectures
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Number system
Number systemNumber system
Number system
 
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptxchapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
chapter1digitalsystemsandbinarynumbers-151021072016-lva1-app6891.pptx
 
Decimal arithematic operation
Decimal arithematic operationDecimal arithematic operation
Decimal arithematic operation
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)Chapter 2 Data Representation on CPU (part 1)
Chapter 2 Data Representation on CPU (part 1)
 

Recently uploaded

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Digital logic design lecture 03

  • 1. DIGITAL LOGIC DESIGN LECTURE 03 BY-FARHAT ULLAH
  • 2. SIGNED AND UNSIGNED NUMBERS Unsigned Binary Numbers Signed Binary Numbers Most significant bit represents sign 0 represents a positive number 1 represents a negative number
  • 3. 2’S COMPLEMENT FORM 1’s complement form 2’s complement form Binary number 01101 (13) 1’s complement 10010 + 1 2’s complement 10011 (-13)
  • 4. ADDITION AND SUBTRACTION WITH 2’S COMPLEMENT 0101 +5 0101 +5 0010 +2 1110 -2 0111 +7 0011 +3 1011 -5 1011 -5 1110 -2 0010 +2 1001 -7 1101 -3
  • 5. RANGE OF NUMBERS Maximum Range Number of digits Decimal number example Binary number example Overflow
  • 6. RANGE OF BINARY NUMBERS Decimal Number Sign Magnitude 2n-1, 2n-1 -1 2’s Complement 2n-1, 2n-1 -1 Unsigned 2n, 2n - 1 0 0000 0000 000 1 0001 0001 001 2 0010 0010 010 3 0011 0011 011 4 0100 0100 100 5 0101 0101 101 6 0110 0110 110 7 0111 0111 111
  • 7. RANGE OF BINARY NUMBERS Decimal Number Sign Magnitude 2n-1-1, -(2n-1 -1) 2’s Complement 2n-1, -2n-1 Unsigned -8 1000 -7 1111 1001 -6 1110 1010 -5 1101 1011 -4 1100 1100 -3 1011 1101 -2 1010 1110 -1 1001 1111
  • 8. RANGE OF NUMBERS Unsigned  Positive Numbers Only (0 to 7)  3-bit Signed Magnitude  Positive & Negative Numbers (-7 to 7)  4-bit 2’s Complement  Positive & Negative Numbers (-8 to 7)  4-bit
  • 9. RANGE & OVERFLOW 2 + 7 using 3-bit unsigned binary? 9 overflow? 2 – 7? Can not represent -7 in unsigned binary
  • 10. RANGE AND OVERFLOW 1011 -5 1101 -3 11000 -8 1011 -5 0101 +5 1100 -4 0100 +4 10111 -9 1001 +9
  • 11. OCTAL NUMBER SYSTEM Base 8 0, 1, 2, 3, 4, 5, 6, 7 Representing Binary in compact form 11011000001102 = 154068
  • 12. COUNTING IN OCTAL Decimal Binary Octal 0 000 0 1 001 1 2 010 2 3 011 3 4 100 4 5 101 5 6 110 6 7 111 7
  • 13. COUNTING IN OCTAL Decimal Octal Decimal Octal Decimal Octal 8 10 16 20 24 30 9 11 17 21 25 31 10 12 18 22 26 32 11 13 19 23 27 33 12 14 20 24 28 34 13 15 21 25 29 35 14 16 22 26 30 36 15 17 23 27 31 37
  • 14. BINARY-OCTAL CONVERSION Binary to Octal Conversion 11010110101110010110 011 010 110 101 110 010 110 3 2 6 5 6 2 6 Octal to Binary Conversion 1726 001 111 010 110
  • 15. DECIMAL-OCTAL CONVERSION Decimal to Octal Conversion Indirect Method Decimal →Binary → Octal Repeated Division by 8 Octal to Decimal Conversion Indirect Method Octal →Binary → Decimal Sum-of-Weights
  • 16. REPEATED DIVISION BY 8 Number Quotient Remainder 2075 259 3 (O0) 259 32 3 (O1) 32 4 0 (O2) 4 0 4 (O3)
  • 17. SUM-OF-WEIGHTS 4033 (4 x 83) + (0 x 82) + (3 x 81) + (3 x 80) (4 x 512) + (0 x 64) + (3 x 8) + (3 x 1) 2048 + 0 + 24 + 3 2075
  • 18. OCTAL ADDITION Carry 1 7602 2+1=3d 3O + 5771 0+7=7d 7O 15573 6+7=13d 15O 1+7+5=13d 15O
  • 19. OCTAL SUBTRACTION Borro 11 7602 2-1=1d 1O - 5771 8-7=1d 1O 1611 13- 7=6d 6O 6-5=1d 1O
  • 20. HEXADECIMAL NUMBER SYSTEM Base 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Representing Binary in compact form 11011000001102 = 1B06 H
  • 21. COUNTING IN HEXADECIMAL Decimal Binary Hexadecimal Decimal Binary Hexadecimal 0 0000 0 8 1000 8 1 0001 1 9 1001 9 2 0010 2 10 1010 A 3 0011 3 11 1011 B 4 0100 4 12 1100 C 5 0101 5 13 1101 D 6 0110 6 14 1110 E 7 0111 7 15 1111 F
  • 22. COUNTING IN HEXADECIMAL Decimal Hexa- Decimal Decimal Hexa- Decimal Decimal Hexa- Decimal 16 10 24 18 32 20 17 11 25 19 33 21 18 12 26 1A 34 22 19 13 27 1B 35 23 20 14 28 1C 36 24 21 15 29 1D 37 25 22 16 30 1E 38 26 23 17 31 1F 39 27
  • 23. BINARY-HEXADECIMAL CONVERSION Binary to Hexadecimal Conversion 11010110101110010110 1101 0110 1011 1001 0110 D 6 B 9 6 Hexadecimal to Binary Conversion FD13 1111 1101 0001 0011
  • 24. DECIMAL-HEXADECIMAL CONVERSION Decimal to Hexadecimal Conversion Indirect Method Decimal →Binary → Hexadecimal Repeated Division by 16 Hexadecimal to Decimal Conversion Indirect Method Hexadecimal →Binary → Decimal Sum-of-Weights
  • 25. REPEATED DIVISION BY 16 Number Quotient Remainder 2096 131 0 131 8 3 8 0 8
  • 26. SUM-OF-WEIGHTS CA02 (C x 163) + (A x 162) + (0 x 161) + (2 x 160) (12 x 163) + (10 x 162) + (0 x 161) + (2 x 160) (12 x 4096) + (10 x 256) + (0 x 16) + (2 x 1) 49152 + 2560 + 0 + 2 51714
  • 27. HEXADECIMAL ADDITION Carry 1 2AC6 6+5=11d Bh + 92B5 C+B=23d 17h BD7B A+2+1=13d Dh 2+9=11d Bh
  • 28. HEXADECIMAL SUBTRACTION Borrow 111 92B5 21-6=15d Fh - 2AC6 26-C=14d Eh 67EF 17-A=7d 7h 8-2=6d 6h
  • 29. ALTERNATE REPRESENTATIONS BCD (Binary Coded Decimal) Code Decimal BCD Decimal BCD 0 0000 5 0101 1 0001 6 0110 2 0010 7 0111 3 0011 8 1000 4 0100 9 1001
  • 30. BCD ADDITION Multi-digit BCD numbers can be added together 23 0010 0011 45 0100 0101 68 0110 1000 23 0010 0011 48 0100 1000 71 0110 1011 1011 is illegal BCD number
  • 31. BCD ADDITION Add a 0110 (6) to an invalid BCD number Carry added to the most significant BCD digit 23 0010 0011 48 0100 1000 71 0110 1011 0110 0111 0001
  • 32. ALPHANUMERIC CODE Numbers, Characters, Symbols ASCII 7-bit Code American Standard Code for Information Interchange 10 Numbers (0-9) 26 Lower Case Characters (a-z) 26 Upper Case Characters (A-Z) Punctuation and Symbols 32 Control Characters
  • 33. ASCII CODE Numbers 0 to 9 ASCII 0110000 (30h) to 0111001 (39h) Alphabets a to z ASCII 1100001 (61h) to 1111010 (7Ah) Alphabets A to Z ASCII 1000001 (41h) to 1011010 (5Ah) Control Characters ASCII 0000000 (0h) to 0011111 (1Fh)
  • 34. ERROR DETECTION Digital Systems are very Reliable Errors during storage or transmission Parity Bit Even Parity Odd Parity
  • 35. ODD PARITY ERROR DETECTION Original data 10011010 With Odd Parity 110011010 1-bit error 110111010 Number of 1s even indicates 1-bit error 2-bit error 110110010 Number of 1s odd no error indicated 3-bit error 100110010 Number of 1s even indicates error