Chapter 1 - Digital Systems and Information: Logic and Computer Design Fundamentals
Chapter 1 - Digital Systems and Information: Logic and Computer Design Fundamentals
Chapter 1 2
DIGITAL & COMPUTER SYSTEMS - Digital
System
Discrete Discrete
Inputs Information
Processing Discrete
System Outputs
System State
Chapter 1 3
Types of Digital Systems
No state present
• Combinational Logic System
• Output = Function(Input)
State present
• State updated at discrete times
=> Synchronous Sequential System
• State updated at any time
=>Asynchronous Sequential System
• State = Function (State, Input)
• Output = Function (State)
or Function (State, Input)
Chapter 1 4
Digital System Example:
Count Up
Reset 0 0 1 3 5 6 4
Synchronous or Asynchronous?
Chapter 1 5
Digital Computer Example
Memory
Control
CPU unit Datapath
Inputs:
Outputs: LCD
keyboard, mouse,
screen, wireless,
wireless, Input/Output speakers
microphone
Synchronous or
Asynchronous?
Chapter 1 6
And Beyond – Embedded Systems
Chapter 1 7
Embedded Systems
Chapter 1 9
Signal Examples Over Time
Time
Continuous in
value & time
Analog
Digital Discrete in
value &
Asynchronous continuous in
time
Discrete in
Synchronous
value & time
Chapter 1 10
Signal Example – Physical Quantity: Voltage
Threshold
Region
Chapter 1 11
Binary Values: Other Physical Quantities
Chapter 1 12
NUMBER SYSTEMS – Representation
r r
i=n-1 j=-1
(Number)r = i j
Ai Aj
i=0 j=-m
(Integer Portion) + (Fraction Portion)
Chapter 1 13
Number Systems – Examples
Chapter 1 15
ARITHMETIC OPERATIONS - Binary
Arithmetic
Chapter 1 16
Single Bit Binary Addition with Carry
Carry in (Z) of 1: Z 1 1 1 1
X 0 0 1 1
+Y +0 +1 +0 +1
CS 01 10 10 11
Chapter 1 17
Multiple Bit Binary Addition
Chapter 1 18
Single Bit Binary Subtraction with Borrow
Given two binary digits (X,Y), a borrow in (Z) we
get the following difference (S) and borrow (B):
Borrow in (Z) of 0: Z
0 0 0 0
X 0 0 1 1
-Y -0 -1 -0 -1
BS 00 11 01 00
Borrow in (Z) of 1: Z
1
1
1
1
X 0 0 1 1
-Y -0 -1 -0 -1
BS 11 10 00 11
Chapter 1 19
Multiple Bit Binary Subtraction
Chapter 1 20
Binary Multiplication
Chapter 1 23
Converting Decimal to Binary
Method 1
• Subtract the largest power of 2 (see slide 14) that gives a
positive remainder and record the power.
• Repeat, subtracting from the prior remainder and
recording the power, until the remainder is zero.
• Place 1’s in the positions in the binary result corresponding
to the powers recorded; in all other positions place 0’s.
Example: Convert 62510 to N2
Chapter 1 24
Commonly Occurring Bases
Chapter 1 25
Numbers in Different Bases
Method 2
To convert from one base to another:
1) Convert the Integer Part
2) Convert the Fraction Part
3) Join the two results with a radix point
Chapter 1 27
Conversion Details
Convert 46 to Base 2
Chapter 1 31
Why Do Repeated Division and
Multiplication Work?
Divide the integer portion of the power series on
slide 11 by radix r. The remainder of this
division is A0, represented by the term A0/r.
Discard the remainder and repeat, obtaining
remainders A1, …
Multiply the fractional portion of the power
series on slide 11 by radix r. The integer part of
the product is A-1.
Discard the integer part and repeat, obtaining
integer parts A-2, …
This demonstrates the algorithm for any radix r
>1.
Chapter 1 32
Octal (Hexadecimal) to Binary and
Back
Octal (Hexadecimal) to Binary:
• Restate the octal (hexadecimal) as three
(four) binary digits starting at the radix
point and going both ways.
Binary to Octal (Hexadecimal):
• Group the binary digits into three (four) bit
groups starting at the radix point and going
both ways, padding with zeros as needed in
the fractional part.
• Convert each group of three bits to an octal
(hexadecimal) digit.
Chapter 1 33
Octal to Hexadecimal via Binary
Chapter 1 34
A Final Conversion Note
Chapter 1 35
Binary Numbers and Binary Coding
Flexibility of representation
• Within constraints below, can assign any binary
combination (called a code word) to any data as long
as data is uniquely encoded.
Information Types
• Numeric
Must represent range of data needed
Very desirable to represent data such that simple,
straightforward computation for common arithmetic
operations permitted
Tight relation to binary numbers
• Non-numeric
Greater flexibility since arithmetic operations not applied.
Not tied to binary numbers
Chapter 1 36
Non-numeric Binary Codes
Chapter 1 37
Number of Bits Required
Chapter 1 40
Binary Coded Decimal (BCD)
Chapter 1 41
Excess 3 Code and 8, 4, –2, –1 Code
Chapter 1 43
BCD Arithmetic
Given a BCD code, we use binary arithmetic to add the digits:
8 1000 Eight
+5 +0101 Plus 5
13 1101 is 13 (> 9)
Note that the result is MORE THAN 9, so must be
represented by two digits!
To correct the digit, subtract 10 by adding 6 modulo 16.
8 1000 Eight
+5 +0101 Plus 5
13 1101 is 13 (> 9)
+0110 so add 6
carry = 1 0011 leaving 3 + cy
0001 | 0011 Final answer (two digits)
If the digit sum is > 9, add one to the next significant digit
Chapter 1 44
BCD Addition Example
Chapter 1 45
ALPHANUMERIC CODES - ASCII Character
Codes
American Standard Code for Information
Interchange (Refer to Table 1-4 in the text)
This code is a popular code used to represent
information sent as character-based data. It uses
7-bits to represent:
• 94 Graphic printing characters.
• 34 Non-printing characters
Some non-printing characters are used for text
format (e.g. BS = Backspace, CR = carriage return)
Other non-printing characters are used for record
marking and flow control (e.g. STX and ETX start
and end text areas).
Chapter 1 46
ASCII Properties
Chapter 1 47
PARITY BIT Error-Detection Codes
Chapter 1 50
Optical Shaft Encoder
G2
G1
111 G0
101 010 011
Is this a problem?
Chapter 1 52
Shaft Encoder (Continued)
Is this a problem?
Chapter 1 54
Terms of Use
All (or portions) of this material © 2008 by Pearson
Education,Inc.
Permission is given to incorporate this material or
adaptations thereof into classroom presentations and
handouts to instructors in courses adopting the latest
edition of Logic and Computer Design Fundamentals
as the course textbook.
These materials or adaptations thereof are not to be
sold or otherwise offered for consideration.
This Terms of Use slide or page is to be included within
the original materials or any adaptations thereof.
Chapter 1 55