Chap 01
Chap 01
Chapter 1 2
Digital Systems
Chapter 1 3
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 4
Digital Computer
Chapter 1 5
▪ The program and user data are transferred to
memory by input devices.
▪ Output devices display the result.
▪ The control unit in the CPU retrieves the
instructions from the program stored in
memory.
▪ A digital computer can
• perform arithmetic computations,
• manipulate strings of alphabetic characters,
• Make decisions based on internal and external
conditions.
Chapter 1 6
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 7
Signal Example – Physical Quantity: Voltage
Threshold
Region
Chapter 1 8
INFORMATION REPRESENTATION - Signals
Chapter 1 9
Embedded Microcomputers
Chapter 1 10
And Beyond – Embedded Systems
Discrete Discrete
Inputs Information
Processing Discrete
System Outputs
System State
Chapter 1 12
Digital System Example:
A Digital Counter
Count Up
Reset 0 0 1 3 5 6 4
Chapter 1 13
Examples of Embedded Systems
Chapter 1 14
Impact of Digital Systems
Chapter 1 15
More on Generic Computer
(Number)r = (
i=n-1
Ai r )+(
i
j=-1
Aj r)
j
i=0 j=-m
(Integer Portion) + (Fraction Portion)
Chapter 1 17
Number Systems – Examples
Chapter 1 18
Examples
▪ Conversion to decimal:
▪ 724.5= 7 x 102 + 2 x 101 + 4 x 100 + 5 x 10-1
▪ (11010.11)2 = 1 x 24 + 1 x 23 + 0 x 22 + 1 x 21 +
0 x 20 + 1x2-1 + 1 x2-2 = (26.75) 10
▪ Conversion to Binary:
625 -512 = 113
113 – 64 = 49
49 – 32 = 17 ➔ (625)10 = 29 + 26 + 25 + 24 + 20
17 – 16 = 1 = (1001110001)2
1–1=0
Chapter 1 19
Octal and Hexadecimal
Chapter 1 20
Conversions
▪ Binary to Octal:
▪ (010 110 001 101 011.111 100 000 110) 2
= (26153.7406)8
▪ Binary to Hexadecimal:
▪ (0010 1100 0110 1011.1111 0000 0110) 2
= (2C6B.F06)16
▪ Octal and Hex to Binary:
▪ (673.12)8 = (110 111 011.001 010)2
▪ (3A6.C)16 = (0011 1010 0110.1100)2
Chapter 1 21
Special Powers of 2
Chapter 1 22
ARITHMETIC OPERATIONS - Binary
Arithmetic
Chapter 1 23
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 24
Multiple Bit Binary Addition
Chapter 1 25
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 26
Multiple Bit Binary Subtraction
Chapter 1 27
Binary Multiplication
Chapter 1 31
Commonly Occurring Bases
Chapter 1 32
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 34
Conversion Details
Chapter 1 35
Example: Convert 46.687510 To Base 2
Chapter 1 36
Checking the Conversion
Chapter 1 37
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 38
Octal to Hexadecimal via Binary
Chapter 1 41
BCD
Chapter 1 42
Binary Coded Decimal (BCD)
Chapter 1 43
Warning: Conversion or Coding?
Chapter 1 44
BCD Addition Example
Chapter 1 46
ALPHANUMERIC CODES - ASCII Character
Codes
▪ American Standard Code for Information
Interchange.
▪ This code is a popular code used to represent
information sent as character-based data. It uses
7-bits to represent 128 characters:
• 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 47
ASCII Properties
Chapter 1 49