SlideShare a Scribd company logo
To know
Introduction
Number Systems
Microcomputer Architecture and Logic Design
(CST161-3)
Vajira Thambawita
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Table of contents
1 To know
References
Mark Allocation
2 Introduction
Contents
3 Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
References
Mark Allocation
Time
Theory - Monday 8.00 - 10.00
Practical - Wednesday 1.00-2.00
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
References
Mark Allocation
References
Digital Design and Computer Architecture, David Money
Harris and Sarah L. Harris
Digital Design with an introduction to the Verilog HDL, M.
Morris Mano and Michael D. Ciletti
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
References
Mark Allocation
Mark Allocation
Continuous Mark - 40%
Practical Exam (After the mid break) - 20%
Hardware Assignment (Group work 3 members per group) -
10%
2 x Pop Quizzes - 10%
End Exam - 60%
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Contents
Contents
Combinational Logic, Combinational Circuit Design and
Analysis, Binary Adder-Subtractor, Decoders, Encoders,
Multiplexers
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Contents
Contents
Combinational Logic, Combinational Circuit Design and
Analysis, Binary Adder-Subtractor, Decoders, Encoders,
Multiplexers
Sequential Logic, Latches, Flip-Flops, Sequential Circuit
analysis and Design Procedure
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Contents
Contents
Combinational Logic, Combinational Circuit Design and
Analysis, Binary Adder-Subtractor, Decoders, Encoders,
Multiplexers
Sequential Logic, Latches, Flip-Flops, Sequential Circuit
analysis and Design Procedure
Digital Circuit Design and Implementation, Organization and
Implementation of Different Architectures, 8086 architecture,
Instructions, memory organization, Buses, Interrupt, IO
operations
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Contents
Contents
Combinational Logic, Combinational Circuit Design and
Analysis, Binary Adder-Subtractor, Decoders, Encoders,
Multiplexers
Sequential Logic, Latches, Flip-Flops, Sequential Circuit
analysis and Design Procedure
Digital Circuit Design and Implementation, Organization and
Implementation of Different Architectures, 8086 architecture,
Instructions, memory organization, Buses, Interrupt, IO
operations
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Decimal Number
7392 = 7 × 103 + 3 × 102 + 9 × 101 + 2 × 100
In general, a number with a decimal point is represented by a
series of coefficients:
a5a4a3a2a1a0.a−1a−2a−3
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Binary Numbers
only two possible values: 0 and 1
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Binary Numbers
only two possible values: 0 and 1
11010.11 ?
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Binary Numbers
only two possible values: 0 and 1
11010.11 ?
11010.11 -?
1×24 +1×23 +0×22 +1×21 +0×20 +1×2−1 +1×2−2 = 26.75
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Binary Numbers
only two possible values: 0 and 1
11010.11 ?
11010.11 -?
1×24 +1×23 +0×22 +1×21 +0×20 +1×2−1 +1×2−2 = 26.75
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Powers of two
Figure: Powers of two
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Convert decimal 41 to binary
Convert decimal 153 to octal
Convert (0.6875)10 to binary
Convert (0.513)10 to octal
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Number-base conversions
Convert decimal 41 to binary
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Number-base conversions
Convert decimal 153 to octal
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Number-base conversions
Convert (0.6875)10 to binary
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Number-base conversions
Convert (0.513)10 to octal
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Number-base conversions
Octal and Hexadecimal Numbers
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
COMPLEMENTS OF NUMBERS
Complements are used in digital computers to simplify the
subtraction operation and for logical manipulation
There are two types of complements for each base-r system:
the radix complement (the r’s complement)
the diminished radix complement (the (r-1)’s complement)
Examples
2’s complement and 1’s complement for binary numbers
the 10’s complement and 9’s complement for decimal numbers
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Diminished Radix Complement
(r-1)’s complement
Given a number N in base r having n digits, the (r -1)’s
complement of N = (rn − 1) − N
The 9’s complement of 546700
The 9’s complement of 012398
The 1’s complement of 1011000
The 1’s complement of 0101101
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Diminished Radix Complement
The 9’s complement of 546700 is 999999-546700= 453299.
The 9’s complement of 012398 is 999999 -012398=987601.
The 1’s complement of 1011000 is 0100111.
The 1’s complement of 0101101 is 1010010.
Do you know?
the 1’s complement of a binary number is formed by changing 1’s
to 0’s and 0’s to 1’s
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
r’s complement
The r’s complement of an ndigit number N in base r is defined as
rn − N for N = 0
0 for N=0
Do you know?
the r’s complement is obtained by adding 1 to the (r-1)’s
complement
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is 753300
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is 753300
the 2’s complement of 1101100 is
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is 753300
the 2’s complement of 1101100 is 0010100
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is 753300
the 2’s complement of 1101100 is 0010100
the 2’s complement of 0110111 is
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is 753300
the 2’s complement of 1101100 is 0010100
the 2’s complement of 0110111 is 1001001
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Radix Complement
Examples
the 10’s complement of 012398 is 987602
the 10’s complement of 246700 is 753300
the 2’s complement of 1101100 is 0010100
the 2’s complement of 0110111 is 1001001
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Subtraction with Complements
The subtraction of two n-digit unsigned numbers M-N in base r
can be done as follows:
1 Add the minuend M to the r’s complement of the subtrahend
N. Mathematically, M + (rn − N) = M − N + rn.
2 If M ≥ N, the sum will produce an end carry rn, which can be
discarded, what is left is the result (M-N).
3 If M < N, the sum does not produce an end carry and is
equal to rn − (N − M), which is the r’s complement of
(N-M). To obtain the answer in a familiar form, take the r’s
complement of the sum and place a negative sign in front.
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
To Do
Given the two binary numbers X=1110100 and Y=1000101,
perform the subtraction
X-Y and Y-X by using 2’s complements
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Range of N-bit numbers
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
To know
Introduction
Number Systems
Decimal
Binary Numbers
Number-base conversions
Complements of numbers
Diminished Radix Complement
Radix Complement
Subtraction with Complements
Example
Comparison of Number Systems
Signed Binary Numbers
Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)

More Related Content

PPT
Introduction to Algorithms
PDF
Algorithem complexity in data sructure
PPTX
Algorithm Complexity and Main Concepts
DOCX
Parallel searching
PPT
Pagerank (from Google)
PDF
Efficient asic architecture of rsa cryptosystem
PPT
Lec5 Pagerank
PDF
Software of Time Series Forecasting based on Combinations of Fuzzy and Statis...
Introduction to Algorithms
Algorithem complexity in data sructure
Algorithm Complexity and Main Concepts
Parallel searching
Pagerank (from Google)
Efficient asic architecture of rsa cryptosystem
Lec5 Pagerank
Software of Time Series Forecasting based on Combinations of Fuzzy and Statis...

Similar to Lec 01 - Microcomputer Architecture and Logic Design (20)

PPT
computer architecture
PPT
Chapter 1 Digital Systems and Binary Numbers.ppt
PPT
An introduction to data_representation.ppt
PPT
DATA REPRESENTATIONS and Data codes and formats.ppt
PPT
DATA REPRESENTATION
PDF
Datarepresentation2
PPT
Data representation moris mano ch 03
PPT
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
PPTX
Chapter 1 digital design.pptx
PPTX
Lecture 4
PDF
1.Digital Logic Design (Chap 01, Topic 1,2 - Binary Systems).pdf
PPTX
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
PPTX
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
PDF
PPTX
digital-systems-and-binary-numbers1.pptx
PPTX
02fdgfhfhfhghghhhhhhhhhhhhhhhhhhhhh.pptx
PPTX
dld 01-introduction
PPTX
Data Analytics with R and SQL Server
PPT
7730763333333333366666666666666999999993.ppt
computer architecture
Chapter 1 Digital Systems and Binary Numbers.ppt
An introduction to data_representation.ppt
DATA REPRESENTATIONS and Data codes and formats.ppt
DATA REPRESENTATION
Datarepresentation2
Data representation moris mano ch 03
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter 1 digital design.pptx
Lecture 4
1.Digital Logic Design (Chap 01, Topic 1,2 - Binary Systems).pdf
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
Logic Circuits Design - "Chapter 1: Digital Systems and Information"
digital-systems-and-binary-numbers1.pptx
02fdgfhfhfhghghhhhhhhhhhhhhhhhhhhhh.pptx
dld 01-introduction
Data Analytics with R and SQL Server
7730763333333333366666666666666999999993.ppt
Ad

More from Vajira Thambawita (20)

PDF
Lecture 4 principles of parallel algorithm design updated
PDF
Lecture 3 parallel programming platforms
PDF
Lecture 2 more about parallel computing
PDF
Lecture 1 introduction to parallel and distributed computing
PDF
Lecture 12 localization and navigation
PDF
Lecture 11 neural network principles
PDF
Lecture 10 mobile robot design
PDF
Lecture 09 control
PDF
Lecture 08 robots and controllers
PDF
Lecture 07 more about pic
PDF
Lecture 06 pic programming in c
PDF
Lecture 05 pic io port programming
PDF
Lecture 04 branch call and time delay
PDF
Lecture 03 basics of pic
PDF
Lecture 02 mechatronics systems
PDF
Lecture 1 - Introduction to embedded system and Robotics
PDF
Lec 09 - Registers and Counters
PDF
Lec 08 - DESIGN PROCEDURE
PDF
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
PDF
Lec 06 - Synchronous Sequential Logic
Lecture 4 principles of parallel algorithm design updated
Lecture 3 parallel programming platforms
Lecture 2 more about parallel computing
Lecture 1 introduction to parallel and distributed computing
Lecture 12 localization and navigation
Lecture 11 neural network principles
Lecture 10 mobile robot design
Lecture 09 control
Lecture 08 robots and controllers
Lecture 07 more about pic
Lecture 06 pic programming in c
Lecture 05 pic io port programming
Lecture 04 branch call and time delay
Lecture 03 basics of pic
Lecture 02 mechatronics systems
Lecture 1 - Introduction to embedded system and Robotics
Lec 09 - Registers and Counters
Lec 08 - DESIGN PROCEDURE
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 06 - Synchronous Sequential Logic
Ad

Recently uploaded (20)

PPTX
master seminar digital applications in india
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Presentation on HIE in infants and its manifestations
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Final Presentation General Medicine 03-08-2024.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
GDM (1) (1).pptx small presentation for students
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Institutional Correction lecture only . . .
human mycosis Human fungal infections are called human mycosis..pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
Computing-Curriculum for Schools in Ghana
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Anesthesia in Laparoscopic Surgery in India
Presentation on HIE in infants and its manifestations
Module 4: Burden of Disease Tutorial Slides S2 2025
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

Lec 01 - Microcomputer Architecture and Logic Design

  • 1. To know Introduction Number Systems Microcomputer Architecture and Logic Design (CST161-3) Vajira Thambawita Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 2. To know Introduction Number Systems Table of contents 1 To know References Mark Allocation 2 Introduction Contents 3 Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 3. To know Introduction Number Systems References Mark Allocation Time Theory - Monday 8.00 - 10.00 Practical - Wednesday 1.00-2.00 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 4. To know Introduction Number Systems References Mark Allocation References Digital Design and Computer Architecture, David Money Harris and Sarah L. Harris Digital Design with an introduction to the Verilog HDL, M. Morris Mano and Michael D. Ciletti Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 5. To know Introduction Number Systems References Mark Allocation Mark Allocation Continuous Mark - 40% Practical Exam (After the mid break) - 20% Hardware Assignment (Group work 3 members per group) - 10% 2 x Pop Quizzes - 10% End Exam - 60% Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 6. To know Introduction Number Systems Contents Contents Combinational Logic, Combinational Circuit Design and Analysis, Binary Adder-Subtractor, Decoders, Encoders, Multiplexers Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 7. To know Introduction Number Systems Contents Contents Combinational Logic, Combinational Circuit Design and Analysis, Binary Adder-Subtractor, Decoders, Encoders, Multiplexers Sequential Logic, Latches, Flip-Flops, Sequential Circuit analysis and Design Procedure Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 8. To know Introduction Number Systems Contents Contents Combinational Logic, Combinational Circuit Design and Analysis, Binary Adder-Subtractor, Decoders, Encoders, Multiplexers Sequential Logic, Latches, Flip-Flops, Sequential Circuit analysis and Design Procedure Digital Circuit Design and Implementation, Organization and Implementation of Different Architectures, 8086 architecture, Instructions, memory organization, Buses, Interrupt, IO operations Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 9. To know Introduction Number Systems Contents Contents Combinational Logic, Combinational Circuit Design and Analysis, Binary Adder-Subtractor, Decoders, Encoders, Multiplexers Sequential Logic, Latches, Flip-Flops, Sequential Circuit analysis and Design Procedure Digital Circuit Design and Implementation, Organization and Implementation of Different Architectures, 8086 architecture, Instructions, memory organization, Buses, Interrupt, IO operations Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 10. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Decimal Number 7392 = 7 × 103 + 3 × 102 + 9 × 101 + 2 × 100 In general, a number with a decimal point is represented by a series of coefficients: a5a4a3a2a1a0.a−1a−2a−3 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 11. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Binary Numbers only two possible values: 0 and 1 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 12. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Binary Numbers only two possible values: 0 and 1 11010.11 ? Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 13. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Binary Numbers only two possible values: 0 and 1 11010.11 ? 11010.11 -? 1×24 +1×23 +0×22 +1×21 +0×20 +1×2−1 +1×2−2 = 26.75 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 14. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Binary Numbers only two possible values: 0 and 1 11010.11 ? 11010.11 -? 1×24 +1×23 +0×22 +1×21 +0×20 +1×2−1 +1×2−2 = 26.75 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 15. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Powers of two Figure: Powers of two Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 16. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Convert decimal 41 to binary Convert decimal 153 to octal Convert (0.6875)10 to binary Convert (0.513)10 to octal Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 17. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Number-base conversions Convert decimal 41 to binary Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 18. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Number-base conversions Convert decimal 153 to octal Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 19. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Number-base conversions Convert (0.6875)10 to binary Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 20. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Number-base conversions Convert (0.513)10 to octal Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 21. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Number-base conversions Octal and Hexadecimal Numbers Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 22. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems COMPLEMENTS OF NUMBERS Complements are used in digital computers to simplify the subtraction operation and for logical manipulation There are two types of complements for each base-r system: the radix complement (the r’s complement) the diminished radix complement (the (r-1)’s complement) Examples 2’s complement and 1’s complement for binary numbers the 10’s complement and 9’s complement for decimal numbers Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 23. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Diminished Radix Complement (r-1)’s complement Given a number N in base r having n digits, the (r -1)’s complement of N = (rn − 1) − N The 9’s complement of 546700 The 9’s complement of 012398 The 1’s complement of 1011000 The 1’s complement of 0101101 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 24. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Diminished Radix Complement The 9’s complement of 546700 is 999999-546700= 453299. The 9’s complement of 012398 is 999999 -012398=987601. The 1’s complement of 1011000 is 0100111. The 1’s complement of 0101101 is 1010010. Do you know? the 1’s complement of a binary number is formed by changing 1’s to 0’s and 0’s to 1’s Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 25. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement r’s complement The r’s complement of an ndigit number N in base r is defined as rn − N for N = 0 0 for N=0 Do you know? the r’s complement is obtained by adding 1 to the (r-1)’s complement Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 26. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 27. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 28. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 29. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is 753300 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 30. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is 753300 the 2’s complement of 1101100 is Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 31. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is 753300 the 2’s complement of 1101100 is 0010100 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 32. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is 753300 the 2’s complement of 1101100 is 0010100 the 2’s complement of 0110111 is Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 33. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is 753300 the 2’s complement of 1101100 is 0010100 the 2’s complement of 0110111 is 1001001 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 34. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Radix Complement Examples the 10’s complement of 012398 is 987602 the 10’s complement of 246700 is 753300 the 2’s complement of 1101100 is 0010100 the 2’s complement of 0110111 is 1001001 Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 35. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Subtraction with Complements The subtraction of two n-digit unsigned numbers M-N in base r can be done as follows: 1 Add the minuend M to the r’s complement of the subtrahend N. Mathematically, M + (rn − N) = M − N + rn. 2 If M ≥ N, the sum will produce an end carry rn, which can be discarded, what is left is the result (M-N). 3 If M < N, the sum does not produce an end carry and is equal to rn − (N − M), which is the r’s complement of (N-M). To obtain the answer in a familiar form, take the r’s complement of the sum and place a negative sign in front. Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 36. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems To Do Given the two binary numbers X=1110100 and Y=1000101, perform the subtraction X-Y and Y-X by using 2’s complements Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 37. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Range of N-bit numbers Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)
  • 38. To know Introduction Number Systems Decimal Binary Numbers Number-base conversions Complements of numbers Diminished Radix Complement Radix Complement Subtraction with Complements Example Comparison of Number Systems Signed Binary Numbers Vajira Thambawita Microcomputer Architecture and Logic Design (CST161-3)