Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Introduction.

Similar presentations


Presentation on theme: "Chapter 1 Introduction."— Presentation transcript:

1 Chapter 1 Introduction

2 1.1 Logic Design Digital System Simple Example of Digital System
Chapter 1 Introduction 1.1 Logic Design Digital System A B n inputs W X m outputs Digital System Inputs & Outputs Clock Simple Example of Digital System A system with three inputs, A,B, and C, and one output Z, such that Z = 1 iff two of the inputs are 1. A B C Z 1 P

3 1.1 Logic Design Digital vs. Analog Two types of digital systems
Chapter 1 Introduction 1.1 Logic Design Digital vs. Analog Values: discrete vs. continuous Time: discrete vs. continuous Two types of digital systems Combinational (조합) Sequential (순차) P

4 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Number systems n : number of digits r : radix or base ai : coefficients Decimal number Binary number

5 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Power of 2 First 32 binary integer Decimal Binary 4-bit 0000 16 10000 1 0001 17 10001 2 10 0010 18 10010 3 11 0011 19 10011 4 100 0100 20 10100 5 101 0101 21 10101 6 110 0110 22 10110 7 111 0111 23 10111 8 1000 24 11000 9 1001 25 11001 1010 26 11010 1011 27 11011 12 1100 28 11100 13 1101 29 11101 14 1110 30 11110 15 1111 31 11111 n 2ⁿ 1 2 11 2,048 4 12 4,096 3 8 13 8,192 16 14 16,384 5 32 15 32,768 6 64 65,536 7 128 17 131,072 256 18 262,144 9 512 19 524,288 10 1,024 20 1,048,576 P. 4

6 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Decimal to Binary  2 = 373 remainder 0 373  2 = 186 remainder 1 10 186  2 = 93 remainder 0 010 93  2 = 46 remainder 1 1010 46  2 = 23 remainder 0 01010 23  2 = 11 remainder 1 101010 11  2 = 5 remainder 1 5  2 = 2 remainder 1 2  2 = 1 remainder 0 1  2 = 0 remainder 1 =

7 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Hexadecimal 16 digits(0 ~ 9, A ~ F) 4-bit string ~ 1 hexadecimal digit = = 2EA 16 2EA 16

8 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Binary Addition 13 + + 5 18 One-bit adder a b cin cout s 1 P. 9

9 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Binary Addition 4-bit adder a4 b4 a3 b3 a2 b2 a1 b1 c1 Full Adder Full Adder Full Adder Full Adder c4 s4 s3 s2 c1 s1 P. 9

10 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Signed Numbers The sign is represented by a single additional bit in binary numbers sign bit 0 : positive 01012 = + 510 11012 = – 510 sign bit 1 : negative Two’s Complement Range of representable number – (2n – 1) ~ + (2n – 1 – 1) Positive number : stored in normal binary Negative number : 2n – a in n-bit system Radix-complement n = number of digits D = rn – D D = complement of n-digit number D

11 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Signed Numbers Converting steps for negative numbers in two’s complement Find the binary equivalent of the magnitude Complement each bit (that is, change 0’s to 1’s and 1’s to 0’s) Add 1 -5 -1 -0 0101 1010 1 1011 0001 1110 1 1111 0000 1111 1

12 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Signed and unsigned 4-bit numbers Binary Positive Signed (two’s complement) 0000 0001 1 +1 0010 2 +2 0011 3 +3 0100 4 +4 0101 5 +5 0110 6 +6 0111 7 +7 1000 8 -8 1001 9 -7 1010 10 -6 1011 11 -5 1100 12 -4 1101 13 -3 1110 14 -2 1111 15 -1 P. 12

13 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Binary Subtraction a – b = = a + (–b) 7 - 5 1 0111 1010 0010 7 0111 1011 0010 -5 + (1’s complement) 2 Overflow 7 - (- 5) 5 - 7 1 0101 1000 1110 1 0111 0100 1100 -2 (true) 12 (overflow)

14 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Fractions, Mixed Numbers and Floating Point Representation Fraction Conversion from decimal to binary .625 · 2 = 1.25 .1 .25 · 2 = 0.50 .10 .50 · 2 = 1.00 .101

15 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Fractions, Mixed Numbers and Floating Point Representation Conversion from decimal to binary .3 · 2 = 0.6 .0 .6 · 2 = 1.2 .01 .2 · 2 = 0.4 .010 .4 · 2 = 0.8 .0100 .8 · 2 = 1.6 .01001 .6 · 2 = 1.2  Use BCD(binary coded decimal) to represent fractions exactly

16 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Fractions, Mixed Numbers and Floating Point Representation Mixed numbers Mixed numbers are converted separately 24.375 24 = .375 = =

17 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Fractions, Mixed Numbers and Floating Point Representation Floating-point representation mantissa x (radix)exponent Floating-point arithmetic Lined up radix point Increase exponent of the smaller number and shift mantissa

18 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Fractions, Mixed Numbers and Floating Point Representation Floating-point arithmetic If mantissa is greater than 1 shift mantissa right and increase exponent If addition results in leading 0’s shift mantissa left to remove 0’s and decrease exponent

19 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Binary Coded Decimal(BCD) Decimal digit 8421 code 5421 code 2421 code Excess 3 code 2 of 5 code 0000 0011 11000 1 0001 0100 10100 2 0010 0101 10010 3 0110 10001 4 0111 01100 5 1000 1011 01010 6 1001 1100 01001 7 1010 1101 00110 8 1110 00101 9 1111 00011 unused any of the 22 patterns with 0, 1, 3, 4, or 5 1’s P. 18

20 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Other Codes ASCII Code a3a2a1a0 a6a5a4 010 011 100 101 110 111 0000 space @ P ` p 0001 ! 1 A Q a q 0010 2 B R b r 0011 # 3 C S c s 0100 $ 4 D T d t 0101 % 5 E U e u 0110 & 6 F V f v 0111 7 G W g w 1000 ( 8 H X h x 1001 ) 9 I Y i y 1010 * : J Z j z 1011 + ; K [ k { 1100 , < L \ l | 1101 = M ] m } 1110 . > N ^ n ~ 1111 / ? O _ o delete P. 19

21 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Other Codes Gray Code Number Gray code 0000 8 1100 1 0001 9 1101 2 0011 10 1111 3 0010 11 1110 4 0110 12 1010 5 0111 13 1011 6 0101 14 1001 7 0100 15 1000 P. 20

22 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Other Codes Hamming Code Single-error-correcting code 4 information bit and 3 check bit a1 a2 a3 a4 a5 a6 a7 Bit 1 X Bit 2 Bit 3 P. 20

23 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Other Codes Hamming Code 16 coded hamming words Date/Bit a1 a2 a3 a4 a5 a6 a7 0000 0001 1 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 P. 21

24 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Other Codes Hamming Code Checking and correcting Received : e1 = 0 e2 = 1 e4 = 0 bit 2(check bit) error => a2 = 1 Correct word : , Data : 1011 Received : e1 = 1 e2 = 0 e4 = 1 bit 5 error => a5 = 0 Correct word : , Data : 0001

25 1.2 A Brief Review Of Number Systems
Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Other Codes Hamming Code n check( n ≥ 2 ) bits : 2n – n – 1 information bits Check bits Data bits 2 1 3 4 11 5 26 P. 22


Download ppt "Chapter 1 Introduction."

Similar presentations


Ads by Google