Chapter 1 Introduction.

Slides:



Advertisements
Similar presentations
Assembly Language and Computer Architecture Using C++ and Java
Advertisements

Number Systems Standard positional representation of numbers:
2-1 Computer Organization Part Fixed Point Numbers Using only two digits of precision for signed base 10 numbers, the range (interval between lowest.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
COE 308: Computer Architecture (T041) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
Binary Number Systems.
Dr. Bernard Chen Ph.D. University of Central Arkansas
The Binary Number System
Simple Data Type Representation and conversion of numbers
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
IT253: Computer Organization
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Lecture 1 Binary Representation Topics Terminology Base 10, Hex, binary Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
46 Number Systems Problem: Implement simple pocket calculator Need: Display, adders & subtractors, inputs Display: Seven segment displays Inputs: Switches.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
Number Systems ELEC 311 Digital Logic and Circuits Dr. Ron Hayne Images Courtesy of Cengage Learning.
1 EENG 2710 Chapter 1 Number Systems and Codes. 2 Chapter 1 Homework 1.1c, 1.2c, 1.3c, 1.4e, 1.5e, 1.6c, 1.7e, 1.8a, 1.9a, 1.10b, 1.13a, 1.19.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
CEC 220 Digital Circuit Design Binary Codes
Lecture 2 Binary Arithmetic Topics Terminology Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement August 26, 2003 CSCE 211.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Number Representation and Arithmetic Circuits
©Brooks/Cole, 2003 Chapter 3 Number Representation.
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Chapter 1 Introduction Digital Systems Digital systems: computation, data processing, control, communication, measurement - Reliable, Integration.
Chapter 9 Computer Arithmetic
Department of Computer Science Georgia State University
Fundamentals of Computer Science
Unit 1 Introduction Number Systems and Conversion.
Addition and Subtraction
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Chapter 4 Operations on Bits.
Digital Logic and Computer Organization
Introduction To Computer Science
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CSCE 211: Digital Logic Design
CSE 102 Introduction to Computer Engineering
William Stallings Computer Organization and Architecture 7th Edition
Data Representation Data Types Complements Fixed Point Representation
EEL 3705 / 3705L Digital Logic Design
CSCE 211: Digital Logic Design
Digital Logic & Design Lecture 03.
CSCE 211: Digital Logic Design
Dr. Clincy Professor of CS
Arithmetic Logical Unit
CSCE 211: Digital Logic Design
ECEG-3202 Computer Architecture and Organization
CSCE 211: Digital Logic Design
Digital Systems and Binary Numbers
Number Representation
Chapter 8 Computer Arithmetic
ECE 331 – Digital System Design
Chapter3 Fixed Point Representation
Chapter 1 (Part c) Digital Systems and Binary Numbers
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
1.6) Storing Integer: 1.7) storing fraction:
Presentation transcript:

Chapter 1 Introduction

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. 1 - 2

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. 1 - 2

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

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

1.2 A Brief Review Of Number Systems Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Decimal to Binary 746 10  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 1101010 5  2 = 2 remainder 1 11101010 2  2 = 1 remainder 0 011101010 1  2 = 0 remainder 1 1011101010 706 10 = 1011101010 2

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 1011101010 2 = 0010 1110 1010 = 2EA 16 2EA 16

1.2 A Brief Review Of Number Systems Chapter 1 Introduction 1.2 A Brief Review Of Number Systems Binary Addition 1 0 1 1 1 0 1 13 + 0 1 0 1 + 5 1 0 0 1 0 18 One-bit adder a b cin cout s 1 P. 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

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

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

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

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)

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

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 .010011  Use BCD(binary coded decimal) to represent fractions exactly

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 = 1 1 0 0 0 .375 = . 0 1 1 24.375 = 11000.011

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

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

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

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

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

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

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

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 : 0010011 e1 = 0 e2 = 1 e4 = 0 bit 2(check bit) error => a2 = 1 Correct word : 0110011, Data : 1011 Received : 1101101 e1 = 1 e2 = 0 e4 = 1 bit 5 error => a5 = 0 Correct word : 1101001, Data : 0001

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