SlideShare a Scribd company logo
Digital Electronics
Prof. Manjunath V Gudur
Department of Electronics and Communication
Department Of Electronics & Communication
Engineering
Boolean Algebra and Logic Circuits:Binary numbers, Number Base
Conversion, octal & Hexa Decimal Numbers, Complements, Basic
definitions, Axiomatic Definition of Boolean Algebra, Basic Theorems
and Properties of Boolean Algebra, Boolean Functions, Canonical and
Standard Forms, Other Logic Operations, Digital Logic Gates (Text 3:
1.2, 1.3, 1.4, 1.5,2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7)
Combinational logic: Introduction, Design procedure, Adders- Half
adder, Full adder (Text 3:4.1, 4.2, 4.3)
Basic Electronics - ELN 2
Module-4
Each number system is associated with a base or radix
Ø The decimal number system is said to be of base or radix 10.
Ø A number in base r contains r digits 0,1,2,...,r-1.
Basic Electronics - ELN 3
Counting/Quantities
Basic Electronics - ELN 4
Basic Electronics - ELN
• Number Conversions
• Arithmetic Operations
• Complements
5
Basic Electronics - ELN 6
Following are the possible conversions among bases
Decimal to Binary
Absolute
value
conversion
Fraction
value
conversion
MSD ( Most Significant Digit ) is same as MSB ( Most Significant Bit )
LSD ( Least Significant Digit ) is same as LSB ( Least Significant Bit )
Decimal to Octal
Absolute
value
conversion
Fraction
value
conversion
Convert (25)10 = (? )8
25
3 - 1
8
8
Convert (0.23)10 = ( ? )8
So (25)10 = (31)8
MSD
LSD
Basic Electronics - ELN 8
Decimal to Hexadecimal
Absolute
value
conversion
Fraction
value
conversion
Convert (31)10 = (? )16
31
1 - F
16
16
Convert (0.65)10 = ( ? )16
So (31)10 = (1�)16
MSD
LSD
Basic Electronics - ELN 9
Basic Electronics - ELN 10
Basic Electronics - ELN 11
Number: An-1.....A1A0 . A-1A-2....A-m
Basic Electronics - ELN 12
Binary to Decimal
(1101.101)2 = (?)10
Basic Electronics - ELN 13
(1101.101)2 = (13.625)10
Basic Electronics - ELN 14
Octal to Decimal
(5632.471)8 = (?)10
Hexa-decimal to Decimal
Basic Electronics - ELN 15
• Octal and hexadecimal number system provides
convenient way of converting large binary numbers into
more compact and smaller groups.
• There are various ways to convert a binary number into
octal and hexadecimal number. You can convert using
direct methods or indirect methods.
• Binary to decimal and decimal octal/hexadecimal number
(indirect method)
• Direct method uses grouping.
Basic Electronics - ELN 16
Basic Electronics - ELN 17
OCT Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
Hex Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
Hex Binary
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Ø Take binary number
Ø Separate the binary digits into groups of three bits from
binary point to the left for integer part and to the right for
fraction part.
Ø Then replace each group of binary number from its
equivalent octal digits. That will be octal equivalent of
given binary number.
Basic Electronics - ELN 19
Note that you can append any number of 0’s in leftmost bit (or before the
most significant bit) for integer part and append any number of 0’s after
the rightmost bit for fraction part for completing the group of 3 bits, this
does not change value of input binary number.
Basic Electronics - ELN 20
Binary to Octal
Octal to Binary
Convert (125.62)8 to Binary
Convert (10101101.0111)2 to Octal
Ø Take binary number
Ø Separate the binary digits into groups of four bits from
binary point to the left for integer part and to the right for
fraction part.
Ø Then replace each group of binary number from its
equivalent hexadecimal digits. That will be hexadecimal
equivalent of given binary number.
Basic Electronics - ELN 21
Note that you can append any number of 0’s in leftmost bit (or before the
most significant bit) for integer part and append any number of 0’s after
the right most bit for fraction part for completing the group of 4 bits, this
does not change value of input binary number.
Binary to Hexadecimal Hexadecimal to Binary
Basic Electronics - ELN 22
Octal to Hexadecimal
Basic Electronics - ELN 23
Hexadecimal to Octal
Basic Electronics - ELN 24
Basic Electronics - ELN 25
Binary arithmetic is used in digital systems mainly because the
numbers are stored in binary format in most computer systems.
All arithmetic operations such as addition, subtraction, multiplication,
and division are done in binary representation of numbers.
•Binary Addition
• Binary Subtraction
• Binary Multiplication
• Binary Division
Basic Electronics - ELN 26
A B A+B
0 0 0
0 1 1
1 0 1
1 1 10
A + B Sum Carry Out
0 + 0 0 0
0 + 1 1 0
1 + 0 1 0
1 + 1 0 1
A + B + Carry in Sum Carry Out
0 + 0 + 1 1 0
0 + 1 + 1 0 1
1 + 0 + 1 0 1
1 + 1 + 1 1 1
Basic Electronics - ELN 27
Carry: 1 1 1
(6 0) 10 Augend 1 1 1 1 0 0
+ (4 2) 10 Addend 1 0 1 0 1 0
(1 0 2)10 Sum: 1 1 0 0 1 1 0
Carry: 1 1 1
(2 8) 10 Augend 1 1 1 0 0
+ (1 4) 10 Addend 0 1 1 1 0
( 4 2)10 Sum: 1 0 1 0 1 0
1. Add (60)10 with (42)10 using binary addition
2. Add (11100)2 and (1110)2 using binary addition
Basic Electronics - ELN 28
Carry: 1 1 1 1
(5 . 7 5) 10
equivalent decimal is 1 0 1 . 1 1
+ (7 . 5 0) 10
equivalent decimal is 1 1 1 . 1 0
(1 3 . 2 5)10 Sum: 1 1 0 1 . 0 1
3. Add (101.11)2 and (111.10)2 using binary addition
Basic Electronics - ELN 29
Complements are used in the digital computers in order to simplify
the subtraction operation and for the logical manipulations.
For each radix-r system (base-r) there are two types of complements
they are,
1. r’s complement and
2. (r-1)’s complement.
Therefore for binary number system with r = 2, it has
1. 1’s complement and
2. 2’s complement.
Basic Electronics - ELN 30
Subtractions by 1’s Complement method:
The algorithm to subtract two binary numbers (i.e,A - B) using 1’s complement is explained as
follows:
Ø Take 1’s complement of ‘B’ subtrahend
Ø Result = ‘A’ (minuend) + 1’s complement of ‘B’ subtrahend.
Ø In step 2 if there is carry (1) out of MSB bit, then the result is positive and is in true form.
Add that carry to the least significant bit (LSB) of the above result to get final result.
Ø In step 2 if there is no carry out of MSB bit , then the result is negative and is in the 1’s
complement form. (To find the actual difference between ‘A’ and ‘B’ take 1’s complement
of this result and put minus sign infront of the number.)
(Note:
1. The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called as taking
complement or 1's complement.
2. Subtrahend is a number that to be subtracted from the another number, i.e., minuend.)
Basic Electronics - ELN 31
A = 05 = 1 0 1 (Minuend) ----------------------------------------------------> 1 0 1
- - - +
B = 04 = 1 0 0 (subtrahend) ----> 1’s complement of subtrahend ----> 0 1 1
01 EAC 1 0 0 0
+ 1
0 0 1
The result is positive
There is a carry out of MSB, the result is positive
and hence add this carry to LSB to get final result.
1. Perform (05)10 - (04)10 using binary 1’s complement subtraction.
we can write it as A + (-B) = 5 + (-4).
Now we have to represent +4 in binary and take 1’s complement of it to represent -4.
Basic Electronics - ELN 32
A = 05 = 1 0 1 (Minuend) ----------------------------------------------------> 1 0 1
- - - +
B = 04 = 1 0 0 (subtrahend) ----> 1’s complement of subtrahend ----> 0 1 1
01 EAC 1 0 0 0
+ 1
0 0 1
The result is positive
There is a carry out of MSB, the result is positive
and hence add this carry to LSB to get final result.
2. Perform (05)10 - (04)10 using binary 1’s complement subtraction.
we can write it as A + (-B) = 5 + (-4).
Now we have to represent +4 in binary and take 1’s complement of it to represent -4.
Basic Electronics - ELN 33
3. Subtract 1000.012 from 1011.102 using binary 1’s complement subtraction.
A = 1011.10 = 11.50 --------------------------------------------------> 1 0 1 1 . 1 0
- - +
B = 1000.01 = 08.25 ---> 1’s complement of subtrahend ---> 0 1 1 1 . 1 0
03.25 1 0 0 1 1 . 0 0
+ 1
0 0 1 1 . 0 1
There is a carry out of MSB, the result is positive
and hence add this carry to LSB to get final result.
Basic Electronics - ELN 34
Basic Electronics - ELN 35
Subtractions by 2’s Complement method:
The algorithm to subtract two binary numbers (i.e,A - B) using 2’s complement is explained as
follows:
Ø Take 2’s complement of ‘B’ subtrahend.
Ø Result = ‘A’ (minuend) + 2’s complement of ‘B’ subtrahend.
Ø In step 2 if there is carry (1) out of MSB bit then the result is positive and is in true form. in
this case carry is discarded..
Ø In step 2 if there is no carry out of MSB bit , then the result is negative and is in the 2’s
complement form. (To find the actual difference between ‘A’ and ‘B’ take 2’s complement
of this result)
Note:
Ø 2’s complement = 1’s complement+1
Ø Adding end-around carry-bit occurs only in 1’s complement arithmetic operations but not in 2’s complement
arithmetic operations
A = 05 = 1 0 1 (Minuend) To get 2’s complement of subtrahend:
- - -
B = 04 = 1 0 0 (subtrahend) --------------------> 1’s complement------> 0 1 1
01 + 1
2’s complement of subtrahend: 1 0 0
Now add Minuend with 2’s complement of subtrahend to get the result:
1 0 1
+
1 0 0
1 0 0 1
Basic Electronics - ELN 36 36
There is a carry out of MSB, discard
the carry and the result is positive.
Final Result = 001
1. Perform (5)10 - (4)10 using binary 2’s complement subtraction.
2. Perform (04)10 - (05)10 using binary 2’s complement subtraction.
A = 04 = 1 0 0 (Minuend) To get 2’s complement of subtrahend:
B = 05 = 1 0 1 (subtrahend) --------------------> 1’s complement---> 0 1 0
- 01 + 1
2’s complement of subtrahend: 0 1 1
Now add Minuend with 2’s complement of subtrahend to get the result:
1 0 0
+
0 1 1
1 1 1
Now take 2’ complement of 111 = 000+1= -001.
Basic Electronics - ELN 37
There is no carry out of MSB, result is
negative. To get the actual difference
take the 2’s complement of the result.
Basic Electronics - ELN 38
3. Perform 2810 - 1910 using 2’s complement method.
4. Subtract 1000.012 from 1011.102 using binary 2’s complement subtraction.
A = 1011.10 (Minuend) To get 2’s complement of subtrahend:
- -
B = 1000.01 (subtrahend) ----------------> 1’s complement----------> 0 1 1 1 . 1 0
+ 1
2’s complement ----------> 0 1 1 1 . 1 1
Now add Minuend with 2’s complement of subtrahend to get the result:
1 0 1 1 . 1 0
+
0 1 1 1 . 1 1
1 0 0 1 1 . 0 1
Basic Electronics - ELN 39
There is a carry out of MSB, discard
the carry. Result obtained is positive.

More Related Content

Similar to Module 4_Digital Electronics till complements.pdf

100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt
namraashraf56
 
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
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
AshwiniMate10
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
MdJubayerFaisalEmon
 
Number Systems.pdf .
Number Systems.pdf                        .Number Systems.pdf                        .
Number Systems.pdf .
happycocoman
 
About the computer of the important field
About the computer               of the important fieldAbout the computer               of the important field
About the computer of the important field
shubhamgupta7133
 
Digital Electronics and Computer Language
Digital Electronics and Computer Language Digital Electronics and Computer Language
Digital Electronics and Computer Language
Manthan Chavda
 
computer Unit 2
computer Unit 2computer Unit 2
computer Unit 2
Aqeel Rehman
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
Abhiraj Bohra
 
Logic Design
Logic DesignLogic Design
Logic Design
Partha_bappa
 
digital systems and information
digital systems and informationdigital systems and information
digital systems and information
Kamran Zafar
 
Module 4
Module 4Module 4
Module 4
sadhanakumble
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
janani thirupathi
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
Srikrishna Thota
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
MahiboobAliMulla
 
Number system
Number systemNumber system
Number system
Mantra VLSI
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
MahiboobAliMulla
 

Similar to Module 4_Digital Electronics till complements.pdf (20)

100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt100_2_digitalSystem_Chap1 (2).ppt
100_2_digitalSystem_Chap1 (2).ppt
 
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
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
 
Number Systems.pdf .
Number Systems.pdf                        .Number Systems.pdf                        .
Number Systems.pdf .
 
About the computer of the important field
About the computer               of the important fieldAbout the computer               of the important field
About the computer of the important field
 
Digital Electronics and Computer Language
Digital Electronics and Computer Language Digital Electronics and Computer Language
Digital Electronics and Computer Language
 
computer Unit 2
computer Unit 2computer Unit 2
computer Unit 2
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Logic Design
Logic DesignLogic Design
Logic Design
 
digital systems and information
digital systems and informationdigital systems and information
digital systems and information
 
Module 4
Module 4Module 4
Module 4
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
Arithmetic Logic
Arithmetic LogicArithmetic Logic
Arithmetic Logic
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
 
B sc3 unit 2 number system
B sc3  unit 2 number systemB sc3  unit 2 number system
B sc3 unit 2 number system
 
Number system
Number systemNumber system
Number system
 
B sc ii sem unit 2(a) ns
B sc ii sem  unit 2(a) nsB sc ii sem  unit 2(a) ns
B sc ii sem unit 2(a) ns
 

Recently uploaded

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 

Recently uploaded (20)

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 

Module 4_Digital Electronics till complements.pdf

  • 1. Digital Electronics Prof. Manjunath V Gudur Department of Electronics and Communication Department Of Electronics & Communication Engineering
  • 2. Boolean Algebra and Logic Circuits:Binary numbers, Number Base Conversion, octal & Hexa Decimal Numbers, Complements, Basic definitions, Axiomatic Definition of Boolean Algebra, Basic Theorems and Properties of Boolean Algebra, Boolean Functions, Canonical and Standard Forms, Other Logic Operations, Digital Logic Gates (Text 3: 1.2, 1.3, 1.4, 1.5,2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7) Combinational logic: Introduction, Design procedure, Adders- Half adder, Full adder (Text 3:4.1, 4.2, 4.3) Basic Electronics - ELN 2 Module-4
  • 3. Each number system is associated with a base or radix Ø The decimal number system is said to be of base or radix 10. Ø A number in base r contains r digits 0,1,2,...,r-1. Basic Electronics - ELN 3
  • 5. Basic Electronics - ELN • Number Conversions • Arithmetic Operations • Complements 5
  • 6. Basic Electronics - ELN 6 Following are the possible conversions among bases
  • 7. Decimal to Binary Absolute value conversion Fraction value conversion MSD ( Most Significant Digit ) is same as MSB ( Most Significant Bit ) LSD ( Least Significant Digit ) is same as LSB ( Least Significant Bit )
  • 8. Decimal to Octal Absolute value conversion Fraction value conversion Convert (25)10 = (? )8 25 3 - 1 8 8 Convert (0.23)10 = ( ? )8 So (25)10 = (31)8 MSD LSD Basic Electronics - ELN 8
  • 9. Decimal to Hexadecimal Absolute value conversion Fraction value conversion Convert (31)10 = (? )16 31 1 - F 16 16 Convert (0.65)10 = ( ? )16 So (31)10 = (1�)16 MSD LSD Basic Electronics - ELN 9
  • 11. Basic Electronics - ELN 11 Number: An-1.....A1A0 . A-1A-2....A-m
  • 13. Binary to Decimal (1101.101)2 = (?)10 Basic Electronics - ELN 13 (1101.101)2 = (13.625)10
  • 14. Basic Electronics - ELN 14 Octal to Decimal (5632.471)8 = (?)10
  • 15. Hexa-decimal to Decimal Basic Electronics - ELN 15
  • 16. • Octal and hexadecimal number system provides convenient way of converting large binary numbers into more compact and smaller groups. • There are various ways to convert a binary number into octal and hexadecimal number. You can convert using direct methods or indirect methods. • Binary to decimal and decimal octal/hexadecimal number (indirect method) • Direct method uses grouping. Basic Electronics - ELN 16
  • 17. Basic Electronics - ELN 17 OCT Binary 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111 Hex Binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 Hex Binary 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111
  • 18.
  • 19. Ø Take binary number Ø Separate the binary digits into groups of three bits from binary point to the left for integer part and to the right for fraction part. Ø Then replace each group of binary number from its equivalent octal digits. That will be octal equivalent of given binary number. Basic Electronics - ELN 19 Note that you can append any number of 0’s in leftmost bit (or before the most significant bit) for integer part and append any number of 0’s after the rightmost bit for fraction part for completing the group of 3 bits, this does not change value of input binary number.
  • 20. Basic Electronics - ELN 20 Binary to Octal Octal to Binary Convert (125.62)8 to Binary Convert (10101101.0111)2 to Octal
  • 21. Ø Take binary number Ø Separate the binary digits into groups of four bits from binary point to the left for integer part and to the right for fraction part. Ø Then replace each group of binary number from its equivalent hexadecimal digits. That will be hexadecimal equivalent of given binary number. Basic Electronics - ELN 21 Note that you can append any number of 0’s in leftmost bit (or before the most significant bit) for integer part and append any number of 0’s after the right most bit for fraction part for completing the group of 4 bits, this does not change value of input binary number.
  • 22. Binary to Hexadecimal Hexadecimal to Binary Basic Electronics - ELN 22
  • 23. Octal to Hexadecimal Basic Electronics - ELN 23
  • 24. Hexadecimal to Octal Basic Electronics - ELN 24
  • 25. Basic Electronics - ELN 25 Binary arithmetic is used in digital systems mainly because the numbers are stored in binary format in most computer systems. All arithmetic operations such as addition, subtraction, multiplication, and division are done in binary representation of numbers. •Binary Addition • Binary Subtraction • Binary Multiplication • Binary Division
  • 26. Basic Electronics - ELN 26 A B A+B 0 0 0 0 1 1 1 0 1 1 1 10 A + B Sum Carry Out 0 + 0 0 0 0 + 1 1 0 1 + 0 1 0 1 + 1 0 1 A + B + Carry in Sum Carry Out 0 + 0 + 1 1 0 0 + 1 + 1 0 1 1 + 0 + 1 0 1 1 + 1 + 1 1 1
  • 27. Basic Electronics - ELN 27 Carry: 1 1 1 (6 0) 10 Augend 1 1 1 1 0 0 + (4 2) 10 Addend 1 0 1 0 1 0 (1 0 2)10 Sum: 1 1 0 0 1 1 0 Carry: 1 1 1 (2 8) 10 Augend 1 1 1 0 0 + (1 4) 10 Addend 0 1 1 1 0 ( 4 2)10 Sum: 1 0 1 0 1 0 1. Add (60)10 with (42)10 using binary addition 2. Add (11100)2 and (1110)2 using binary addition
  • 28. Basic Electronics - ELN 28 Carry: 1 1 1 1 (5 . 7 5) 10 equivalent decimal is 1 0 1 . 1 1 + (7 . 5 0) 10 equivalent decimal is 1 1 1 . 1 0 (1 3 . 2 5)10 Sum: 1 1 0 1 . 0 1 3. Add (101.11)2 and (111.10)2 using binary addition
  • 29. Basic Electronics - ELN 29 Complements are used in the digital computers in order to simplify the subtraction operation and for the logical manipulations. For each radix-r system (base-r) there are two types of complements they are, 1. r’s complement and 2. (r-1)’s complement. Therefore for binary number system with r = 2, it has 1. 1’s complement and 2. 2’s complement.
  • 30. Basic Electronics - ELN 30 Subtractions by 1’s Complement method: The algorithm to subtract two binary numbers (i.e,A - B) using 1’s complement is explained as follows: Ø Take 1’s complement of ‘B’ subtrahend Ø Result = ‘A’ (minuend) + 1’s complement of ‘B’ subtrahend. Ø In step 2 if there is carry (1) out of MSB bit, then the result is positive and is in true form. Add that carry to the least significant bit (LSB) of the above result to get final result. Ø In step 2 if there is no carry out of MSB bit , then the result is negative and is in the 1’s complement form. (To find the actual difference between ‘A’ and ‘B’ take 1’s complement of this result and put minus sign infront of the number.) (Note: 1. The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called as taking complement or 1's complement. 2. Subtrahend is a number that to be subtracted from the another number, i.e., minuend.)
  • 31. Basic Electronics - ELN 31 A = 05 = 1 0 1 (Minuend) ----------------------------------------------------> 1 0 1 - - - + B = 04 = 1 0 0 (subtrahend) ----> 1’s complement of subtrahend ----> 0 1 1 01 EAC 1 0 0 0 + 1 0 0 1 The result is positive There is a carry out of MSB, the result is positive and hence add this carry to LSB to get final result. 1. Perform (05)10 - (04)10 using binary 1’s complement subtraction. we can write it as A + (-B) = 5 + (-4). Now we have to represent +4 in binary and take 1’s complement of it to represent -4.
  • 32. Basic Electronics - ELN 32 A = 05 = 1 0 1 (Minuend) ----------------------------------------------------> 1 0 1 - - - + B = 04 = 1 0 0 (subtrahend) ----> 1’s complement of subtrahend ----> 0 1 1 01 EAC 1 0 0 0 + 1 0 0 1 The result is positive There is a carry out of MSB, the result is positive and hence add this carry to LSB to get final result. 2. Perform (05)10 - (04)10 using binary 1’s complement subtraction. we can write it as A + (-B) = 5 + (-4). Now we have to represent +4 in binary and take 1’s complement of it to represent -4.
  • 33. Basic Electronics - ELN 33 3. Subtract 1000.012 from 1011.102 using binary 1’s complement subtraction. A = 1011.10 = 11.50 --------------------------------------------------> 1 0 1 1 . 1 0 - - + B = 1000.01 = 08.25 ---> 1’s complement of subtrahend ---> 0 1 1 1 . 1 0 03.25 1 0 0 1 1 . 0 0 + 1 0 0 1 1 . 0 1 There is a carry out of MSB, the result is positive and hence add this carry to LSB to get final result.
  • 35. Basic Electronics - ELN 35 Subtractions by 2’s Complement method: The algorithm to subtract two binary numbers (i.e,A - B) using 2’s complement is explained as follows: Ø Take 2’s complement of ‘B’ subtrahend. Ø Result = ‘A’ (minuend) + 2’s complement of ‘B’ subtrahend. Ø In step 2 if there is carry (1) out of MSB bit then the result is positive and is in true form. in this case carry is discarded.. Ø In step 2 if there is no carry out of MSB bit , then the result is negative and is in the 2’s complement form. (To find the actual difference between ‘A’ and ‘B’ take 2’s complement of this result) Note: Ø 2’s complement = 1’s complement+1 Ø Adding end-around carry-bit occurs only in 1’s complement arithmetic operations but not in 2’s complement arithmetic operations
  • 36. A = 05 = 1 0 1 (Minuend) To get 2’s complement of subtrahend: - - - B = 04 = 1 0 0 (subtrahend) --------------------> 1’s complement------> 0 1 1 01 + 1 2’s complement of subtrahend: 1 0 0 Now add Minuend with 2’s complement of subtrahend to get the result: 1 0 1 + 1 0 0 1 0 0 1 Basic Electronics - ELN 36 36 There is a carry out of MSB, discard the carry and the result is positive. Final Result = 001 1. Perform (5)10 - (4)10 using binary 2’s complement subtraction.
  • 37. 2. Perform (04)10 - (05)10 using binary 2’s complement subtraction. A = 04 = 1 0 0 (Minuend) To get 2’s complement of subtrahend: B = 05 = 1 0 1 (subtrahend) --------------------> 1’s complement---> 0 1 0 - 01 + 1 2’s complement of subtrahend: 0 1 1 Now add Minuend with 2’s complement of subtrahend to get the result: 1 0 0 + 0 1 1 1 1 1 Now take 2’ complement of 111 = 000+1= -001. Basic Electronics - ELN 37 There is no carry out of MSB, result is negative. To get the actual difference take the 2’s complement of the result.
  • 38. Basic Electronics - ELN 38 3. Perform 2810 - 1910 using 2’s complement method.
  • 39. 4. Subtract 1000.012 from 1011.102 using binary 2’s complement subtraction. A = 1011.10 (Minuend) To get 2’s complement of subtrahend: - - B = 1000.01 (subtrahend) ----------------> 1’s complement----------> 0 1 1 1 . 1 0 + 1 2’s complement ----------> 0 1 1 1 . 1 1 Now add Minuend with 2’s complement of subtrahend to get the result: 1 0 1 1 . 1 0 + 0 1 1 1 . 1 1 1 0 0 1 1 . 0 1 Basic Electronics - ELN 39 There is a carry out of MSB, discard the carry. Result obtained is positive.