SlideShare une entreprise Scribd logo
1  sur  19
Digital Logic Circuits, Digital
Component and Data
Representation
Course: BCA-2nd Sem
Subject: Computer Organization
And Architecture
Unit-1
1
Digital vs. Analog
• An analog system has continuous range of
values
 A mercury thermometer
 Vinyl records
 Human eye
• A digital system has a set of discrete values
Digital Thermometer
Compact Disc (CD)
Digital camera
Benefits of using digital
Binary System
• • Discrete elements of information are
represented with
• bits called binary codes.
Decimal Code
• Review the decimal number system.
• Base (Radix) is 10 - symbols (0,1, . . 9) Digits
• For Numbers > 9, add more significant digits in
position to the left, e.g. 19>9.
• Each position carries a weight.
• If we were to write 1936.25 using a power series
expansion and base 10 arithmetic:
Binary number system
The binary number system.
Base is 2 - symbols (0,1) - Binary Digits (Bits)
For Numbers > 1, add more significant digits in position to the
left, e.g. 10>1.
Each position carries a weight (using decimal).
If we write 10111.01 using a decimal power series we
convert from binary to decimal:
Octal/Hex number systems
• The octal number system
• Its base is 8 à eight digits 0, 1, 2, 3, 4, 5, 6, 7
The hexadecimal number system
– Its base is 16 à first 10 digits are borrowed from the
decimal system and the letters A, B, C, D, E, F are used
for the digits 10, 11, 12, 13, 14, 15
Conversion from Decimal to Binary
• Conversion from decimal to binary:
• Let each bit of a binary number be represented by a variable
whose subscript = bit positions, i.e.,
• Its decimal equivalent is:
• It is necessary to separate the number into an integer part
and a fraction: Repeatedly divide the decimal number by 2.
Conversion from Decimal to Binary
Conversion from Decimal to Binary
• Conversion from decimal fraction to binary:
• same method used for integers except
multiplication is used instead of division.
Conversion from Decimal to Octal[1]
• Conversion from decimal to octal:
• The decimal number is first divided by 8. The
remainder is the LSB. The quotient is then divide
by 8 and the remainder is the next significant bit
and so on.
• Convert 1122 to octal.
Conversion using Table
• Conversion from and to binary, octal, and
hexadecimal plays and important part in digital
computers.
• Since
• each octal digit corresponds to 3 binary digits
and each hexa digit corresponds to 4 binary
digits.
1’s and 2’s Complements
• 1’s complement of N = ( -1) – N (N is a binary
#)
• 1’s complement can be formed by changing 1’s to
0’s and 0’s to 1’s
• 2’s complement of a number is obtained by
leaving all least significant 0’s and the first 1
unchanged, and replacing 1’s with 0’s and 0’s
with 1 in all higher significant digits.
• The 1’s complement of 1101011 = 0010100
• The 2’s complement of 0110111 = 1001001
2n
Subtraction Using Complements
• Subtraction with digital hardware using
complements:
• Subtraction of two n-digit unsigned numbers M –
N
• base r:
• 1. Add M to the r’s complement of N: M + (r– N)
• 2. If M N, the sum will produce an end carry and
is £ equal to rn that can be discarded. The result is
then M – N.
• 3. If M N, the sum will not produce an end carry
• and is equal to rn – (N – M)
Binary Subtraction using complements
• Binary subtraction is done using the same
procedure.
• Subtract 1010100 – 1000011 using 2’s
complement:
Binary Subtraction using complements
• Subtract 1010100 – 1000011 using 1’s
complement:
A = 1010100
• 1’s complement of B =+0111100
Sum = 10010000
End-around carry = + 1
Answer = 0010001
Arithmetic addition
• Negative numbers must be initially in 2’s
complement form and if the obtained sum is
negative, it is in 2’s complement form.
References
1. Computer Organization and Architecture, Designing
for performance by William Stallings, Prentice Hall
of India.
2. Modern Computer Architecture, by Morris Mano,
Prentice Hall of India.
3. Computer Architecture and Organization by John P.
Hayes, McGraw Hill Publishing Company.
4. Computer Organization by V. Carl Hamacher,
Zvonko G. Vranesic, Safwat G. Zaky, McGraw Hill
Publishing Company.

Contenu connexe

Tendances

Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
IIUM
 

Tendances (20)

Number System
Number SystemNumber System
Number System
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)Csc1401   lecture03 - computer arithmetic - arithmetic and logic unit (alu)
Csc1401 lecture03 - computer arithmetic - arithmetic and logic unit (alu)
 
Arithmetic Operations
Arithmetic OperationsArithmetic Operations
Arithmetic Operations
 
Number systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s compNumber systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s comp
 
Conversion of Number Systems
Conversion of Number SystemsConversion of Number Systems
Conversion of Number Systems
 
Integer represention
Integer representionInteger represention
Integer represention
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
Number system
Number systemNumber system
Number system
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Number system utm notes
Number system utm notesNumber system utm notes
Number system utm notes
 
number system
number systemnumber system
number system
 
Addition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (manoAddition and subtraction with signed magnitude data (mano
Addition and subtraction with signed magnitude data (mano
 
Arithmetic circuits
Arithmetic circuitsArithmetic circuits
Arithmetic circuits
 
Digital basics
Digital basicsDigital basics
Digital basics
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Number system
Number systemNumber system
Number system
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 

En vedette

En vedette (20)

Bsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageBsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c language
 
digital logic circuits, digital component floting and fixed point
 digital logic circuits, digital component floting and fixed point digital logic circuits, digital component floting and fixed point
digital logic circuits, digital component floting and fixed point
 
Llb i ecls_u-2_business vocabulary i
Llb i ecls_u-2_business vocabulary iLlb i ecls_u-2_business vocabulary i
Llb i ecls_u-2_business vocabulary i
 
Bba 1 ibo u 5.4 networking & franchising
Bba 1 ibo u 5.4 networking & franchisingBba 1 ibo u 5.4 networking & franchising
Bba 1 ibo u 5.4 networking & franchising
 
Diploma Sem II Unit V Grooming Skills
Diploma Sem II Unit V Grooming SkillsDiploma Sem II Unit V Grooming Skills
Diploma Sem II Unit V Grooming Skills
 
Bjmc i, met, unit-iii, evolution of media laws through the years
Bjmc i, met, unit-iii, evolution of media laws through the yearsBjmc i, met, unit-iii, evolution of media laws through the years
Bjmc i, met, unit-iii, evolution of media laws through the years
 
B.tech i ecls_u-2_framing sentences and vocabulary
B.tech i ecls_u-2_framing sentences and vocabularyB.tech i ecls_u-2_framing sentences and vocabulary
B.tech i ecls_u-2_framing sentences and vocabulary
 
MCA_UNIT-2_Computer Oriented Numerical Statistical Methods
MCA_UNIT-2_Computer Oriented Numerical Statistical MethodsMCA_UNIT-2_Computer Oriented Numerical Statistical Methods
MCA_UNIT-2_Computer Oriented Numerical Statistical Methods
 
Mba 1 me u 1.4 demand and supply
Mba 1 me u 1.4 demand and supplyMba 1 me u 1.4 demand and supply
Mba 1 me u 1.4 demand and supply
 
Unit 3-small-scale-industries
Unit 3-small-scale-industriesUnit 3-small-scale-industries
Unit 3-small-scale-industries
 
B.sc i agri u 4 introduction to ms access
B.sc i agri u 4 introduction to ms accessB.sc i agri u 4 introduction to ms access
B.sc i agri u 4 introduction to ms access
 
Llb i cloi u iv emergency provisions
Llb i cloi u iv emergency provisionsLlb i cloi u iv emergency provisions
Llb i cloi u iv emergency provisions
 
Diploma. ii es unit 2.1 environment ecology and ecosystem
Diploma. ii es unit 2.1 environment ecology and ecosystemDiploma. ii es unit 2.1 environment ecology and ecosystem
Diploma. ii es unit 2.1 environment ecology and ecosystem
 
Llb i cloi u ii organs of parliament
Llb i cloi u ii organs of parliament Llb i cloi u ii organs of parliament
Llb i cloi u ii organs of parliament
 
B.Sc. Biotech Biochem II BM Unit-1.2 Taxonomy and Classification
B.Sc. Biotech Biochem II BM Unit-1.2 Taxonomy and ClassificationB.Sc. Biotech Biochem II BM Unit-1.2 Taxonomy and Classification
B.Sc. Biotech Biochem II BM Unit-1.2 Taxonomy and Classification
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 
Ll.b ii cloi ii u iv.i right to information
Ll.b ii cloi ii u iv.i right to informationLl.b ii cloi ii u iv.i right to information
Ll.b ii cloi ii u iv.i right to information
 
B.tech semester i-unit-ii_partial differentiation
B.tech semester i-unit-ii_partial differentiationB.tech semester i-unit-ii_partial differentiation
B.tech semester i-unit-ii_partial differentiation
 
Guide du logement étudiant 2016
Guide du logement étudiant 2016Guide du logement étudiant 2016
Guide du logement étudiant 2016
 
Présentation du dispositif des attestations scolaires de sécurité routière ou...
Présentation du dispositif des attestations scolaires de sécurité routière ou...Présentation du dispositif des attestations scolaires de sécurité routière ou...
Présentation du dispositif des attestations scolaires de sécurité routière ou...
 

Similaire à Bca 2nd sem-u-1.3 digital logic circuits, digital component

Alu1
Alu1Alu1
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
RavikumarR77
 
digital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptxdigital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptx
abelllll
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
HamnaKhalid25
 

Similaire à Bca 2nd sem-u-1.3 digital logic circuits, digital component (20)

digital logic circuits, digital component
digital logic circuits, digital componentdigital logic circuits, digital component
digital logic circuits, digital component
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
Digital fundamendals r001a
Digital fundamendals r001aDigital fundamendals r001a
Digital fundamendals r001a
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
Alu1
Alu1Alu1
Alu1
 
DLD_Lecture_notes2.ppt
DLD_Lecture_notes2.pptDLD_Lecture_notes2.ppt
DLD_Lecture_notes2.ppt
 
Module 2_Data representations.pdf
Module 2_Data representations.pdfModule 2_Data representations.pdf
Module 2_Data representations.pdf
 
Number Systems.ppt
Number Systems.pptNumber Systems.ppt
Number Systems.ppt
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdfCS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
 
Lecture 2 ns
Lecture 2 nsLecture 2 ns
Lecture 2 ns
 
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
 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.ppt
 
digital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptxdigital-electronics lecture Ch 1and 2 -1.pptx
digital-electronics lecture Ch 1and 2 -1.pptx
 
1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx1.Digital Electronics overview & Number Systems.pptx
1.Digital Electronics overview & Number Systems.pptx
 
Binary Codes and Number System
Binary Codes and Number SystemBinary Codes and Number System
Binary Codes and Number System
 
Week 4-Number Systems.pptx
Week 4-Number Systems.pptxWeek 4-Number Systems.pptx
Week 4-Number Systems.pptx
 
data representation
 data representation data representation
data representation
 
module 1_class_numbers.pptx
module 1_class_numbers.pptxmodule 1_class_numbers.pptx
module 1_class_numbers.pptx
 
Counit2
Counit2Counit2
Counit2
 

Plus de Rai University

Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Rai University
 

Plus de Rai University (20)

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Dernier (20)

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Bca 2nd sem-u-1.3 digital logic circuits, digital component

  • 1. Digital Logic Circuits, Digital Component and Data Representation Course: BCA-2nd Sem Subject: Computer Organization And Architecture Unit-1 1
  • 2. Digital vs. Analog • An analog system has continuous range of values  A mercury thermometer  Vinyl records  Human eye • A digital system has a set of discrete values Digital Thermometer Compact Disc (CD) Digital camera
  • 4. Binary System • • Discrete elements of information are represented with • bits called binary codes.
  • 5. Decimal Code • Review the decimal number system. • Base (Radix) is 10 - symbols (0,1, . . 9) Digits • For Numbers > 9, add more significant digits in position to the left, e.g. 19>9. • Each position carries a weight. • If we were to write 1936.25 using a power series expansion and base 10 arithmetic:
  • 6. Binary number system The binary number system. Base is 2 - symbols (0,1) - Binary Digits (Bits) For Numbers > 1, add more significant digits in position to the left, e.g. 10>1. Each position carries a weight (using decimal). If we write 10111.01 using a decimal power series we convert from binary to decimal:
  • 7. Octal/Hex number systems • The octal number system • Its base is 8 à eight digits 0, 1, 2, 3, 4, 5, 6, 7 The hexadecimal number system – Its base is 16 à first 10 digits are borrowed from the decimal system and the letters A, B, C, D, E, F are used for the digits 10, 11, 12, 13, 14, 15
  • 8. Conversion from Decimal to Binary • Conversion from decimal to binary: • Let each bit of a binary number be represented by a variable whose subscript = bit positions, i.e., • Its decimal equivalent is: • It is necessary to separate the number into an integer part and a fraction: Repeatedly divide the decimal number by 2.
  • 10. Conversion from Decimal to Binary • Conversion from decimal fraction to binary: • same method used for integers except multiplication is used instead of division.
  • 11. Conversion from Decimal to Octal[1] • Conversion from decimal to octal: • The decimal number is first divided by 8. The remainder is the LSB. The quotient is then divide by 8 and the remainder is the next significant bit and so on. • Convert 1122 to octal.
  • 12.
  • 13. Conversion using Table • Conversion from and to binary, octal, and hexadecimal plays and important part in digital computers. • Since • each octal digit corresponds to 3 binary digits and each hexa digit corresponds to 4 binary digits.
  • 14. 1’s and 2’s Complements • 1’s complement of N = ( -1) – N (N is a binary #) • 1’s complement can be formed by changing 1’s to 0’s and 0’s to 1’s • 2’s complement of a number is obtained by leaving all least significant 0’s and the first 1 unchanged, and replacing 1’s with 0’s and 0’s with 1 in all higher significant digits. • The 1’s complement of 1101011 = 0010100 • The 2’s complement of 0110111 = 1001001 2n
  • 15. Subtraction Using Complements • Subtraction with digital hardware using complements: • Subtraction of two n-digit unsigned numbers M – N • base r: • 1. Add M to the r’s complement of N: M + (r– N) • 2. If M N, the sum will produce an end carry and is £ equal to rn that can be discarded. The result is then M – N. • 3. If M N, the sum will not produce an end carry • and is equal to rn – (N – M)
  • 16. Binary Subtraction using complements • Binary subtraction is done using the same procedure. • Subtract 1010100 – 1000011 using 2’s complement:
  • 17. Binary Subtraction using complements • Subtract 1010100 – 1000011 using 1’s complement: A = 1010100 • 1’s complement of B =+0111100 Sum = 10010000 End-around carry = + 1 Answer = 0010001
  • 18. Arithmetic addition • Negative numbers must be initially in 2’s complement form and if the obtained sum is negative, it is in 2’s complement form.
  • 19. References 1. Computer Organization and Architecture, Designing for performance by William Stallings, Prentice Hall of India. 2. Modern Computer Architecture, by Morris Mano, Prentice Hall of India. 3. Computer Architecture and Organization by John P. Hayes, McGraw Hill Publishing Company. 4. Computer Organization by V. Carl Hamacher, Zvonko G. Vranesic, Safwat G. Zaky, McGraw Hill Publishing Company.