Digital Design: From Gates to Intelligent Machines

Slides:



Advertisements
Similar presentations
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Advertisements

Chapter 1 Digital Systems and Numbers System
Craig Schock, 2003 Binary Numbers Numbering Systems Counting Symbolic Bases Common Bases (10, 2, 8, 16) Representing Information Binary to Decimal Conversions.
Chapter 1 Binary Systems 1-1. Digital Systems
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Digital Computers and Information
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Mantıksal Tasarım – BBM231 M. Önder Efe
1.6 Signed Binary Numbers.
Dr. Bernard Chen Ph.D. University of Central Arkansas
1 Data Representation Computer Organization Prof. H. Yoon DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
The character data type char
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Decimal Binary Octal Hex
Logic and Digital System Design - CS 303
PHY281Variables operators and math functions Slide 1 More On Variables and Operators, And Maths Functions In this section we will learn more about variables.
Chapter 3 Data Representation
Dept. of Computer Science Engineering Islamic Azad University of Mashhad 1 DATA REPRESENTATION Dept. of Computer Science Engineering Islamic Azad University.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Lecture 4: Number Systems (Chapter 3) (1) Data TypesSection3-1 (2) ComplementsSection3-2 (3) Fixed Point RepresentationsSection3-3 (4) Floating Point RepresentationsSection3-4.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
1 Information Representation in Computer Lecture Nine.
Chapter 1 Digital Systems and Binary Numbers
CS 2130 Lecture 23 Data Types.
Systems Architecture, Fourth Edition 1 Data Representation Chapter 3.
Overview 1-1 Information Representation
Programming for GCSE Topic 2.2: Binary Representation T eaching L ondon C omputing William Marsh School of Electronic Engineering and Computer Science.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
Digital Logic Design Ch1-1 Chapter 1 Digital Systems and Binary Numbers Mustafa Kemal Uyguroğlu Digital Logic Design I.
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.
PRIMITIVE TYPES IN JAVA Primitive Types Operations on Primitive Types.
Chapter 1 Digital Systems and Binary Numbers
Data Representation COE 308 Computer Architecture
Pale Blue Dot is a photograph of planet Earth taken on February 14, 1990, by the Voyager 1 space probe from a record distance of about 6 billion kilometers,
Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations
Machine level representation of data Character representation
Data Representation ICS 233
Data Representation.
DATA REPRESENTATION Data Types Complements Fixed Point Representations
CHAPTER 1 : INTRODUCTION
Chapter 2 Data Types and Representations
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
Chapter 2 Bits, Data Types, and Operations
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Chapter 2 Bits, Data Types, and Operations
ASCII Character Codes nul soh stx etx eot 1 lf vt ff cr so
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Cosc 2P12 Week 2.
Number Systems Lecture 2.
School of Computer Science and Technology
Introduction to Computer Engineering
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Rayat Shikshan Sanstha’s S. M. Joshi College, Hadapsar
Text Representation ASCII Collating Sequence
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Cosc 2P12 Week 2.
Data Representation COE 308 Computer Architecture
Chapter 2 Bits, Data Types, and Operations
Presentation transcript:

Digital Design: From Gates to Intelligent Machines Bruce F Katz Da Vinci Engineering Press

Number Systems Numbers and Numerals A number is a quantity A numeral is a representation of a number Example (all representations of the quantity 5) 5, V (Roman), 101 (binary), (Babylonian) Not equivalent in ease of computation, however

Number Systems Positional Number Systems A quantity is a weighted sum of powers of a base b Compactness of representation and ease of computation Additional characteristics digits to the left of radix point are integral digits to the right of the radix point are fractional

Number Systems Examples of Positional Number Systems base 2 base 10 102410 = 1*103 + 0*102 + 2*101 + 4*100 base 8 417.238= 4*82 + 1*81 + 7*80 + 2*8-1 + 3*8-2 = 256 + 8 + 7 + 2/8 + 3/64 base 2 1010.1 = 1*23 + 1*21 + 1*2-1 = 10.510

Number Systems Commonly used bases decimal (base 10) binary (base 2) octal (base 8) hexadecimal (base 16) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010 01011 01100 01101 01110 01111 10000 17 20 A B C D E F

Number Systems Which base is best for human use? Base 12 has the most divisors among the small numbers but we usually use base 10. Why?

Number Systems Conversion between bases (special case) Principle If one base is an integer power of another base, can group by this integer to perform conversion. Examples 1011112 = ?8 solution: group by 3 bits {101}{111}2 = 578 F416 = ?2 solution: each hex digit represents 4 bits F416 = {1111}{0100}2 = 111101002

Number Systems Conversion to and from base 10 To base 10 Use definition of a positional number Example: 1101.1012 to base 10 1101.1012 = 1*23 + 1*22 + 0*21 + 1*21 + 1*2-1 + 0*2-2 + 1*2-3 = 13.625 From base 10 Use reformulation of definition of a positional number Successive divisions by the base will yield then digits as remainders Example: 125 to base 3 125/3 = 41 remainder 2 41/3 = 13 remainder 2 13/3 = 4 remainder 1 4/3 = 1 remainder 1 1/3 = 0 remainder 1 therefore answer is 111223

Number Systems Binary Number Systems Motivation Correspondence between 0 and 1 and logical values (true and false) Ease of constructing binary circuits Powers of 2 n 2n significance 4 8 10 16 20 30 40 256 1,024 65,536 1,048,576 1,073,741,824 1.099E12 one nibble (1/2 a byte) one byte; one ASCII char quantity abbreviated by 1K (kilo) two bytes; one UNICODE char quantity abbreviated by 1M (mega) quantity abbreviated by 1G (giga) quantity abbreviated by 1T (tera)

Number Systems Binary Addition and Subtraction Subtraction Addition Same as decimal addition with binary carries 0 0 1 1 0 0 1 0 carry 1 0 0 1 1 1 0 1 addend1 0 1 0 1 1 0 0 1 addend2 ----------------------- 1 1 1 1 0 1 1 0 sum Subtraction Same as decimal subtraction with binary borrows 0 1 0 0 0 1 1 0 borrow 1 1 0 1 1 1 0 0 minuend 0 1 1 0 1 0 0 1 subtrahend 0 1 1 1 0 0 1 1 difference

Number Systems Binary Addition and Subtraction Tables Important: These tables are the foundation for computer arithmetic! addition addend 1 addend 2 carry in sum carry out 1 subtraction minuend subtrahend borrow in difference out 1

Number Systems Binary Multiplication Example Easier than decimal multiplication because always multiplying by 0 or 1 Example 0 1 1 0 * 1 0 1 1 ---------- 0 0 0 0 ------------------- 1 0 0 0 0 1 0

Number Systems Representing Negative Numbers System 1: Signed Magnitude Leftmost bit represents negative sign Examples 01010111 = 87 11010111 = - 87 Advantage Simplicity Disadvantage Mathematical operations clumsy, e.g. addition: if (signs same)then {      add magnitudes      give result this sign } else     /* signs different */      compare magnitudes      subtract smaller from larger      give result sign of the larger

Number Systems Representing Negative Numbers System 2: 2’s complement Positive numbers identical, negative numbers 2n - positive version, where n is the number of bits in the representation Examples 00010001 = 17 100000000 - 00010001 = 11101111 = - 17 Trick for computing negative number Flip all the bits and add 1 00010001 11101110 after flip 11101111 after adding 1 Note: Negative numbers will always begin with 1, positive with 0

Number Systems Representing Negative Numbers Addition method System 2: 2’s complement Addition method Just add! (and ignore any bits > 2n-1) 0 0 1 0 1 0 1 1 (43) +1 1 1 0 1 1 1 1 (-17) ------------------- 1 0 0 0 1 1 0 1 0 Overflow condition: If add 2 positive and get a negative or vice versa Example 1 0 0 0 1 1 1 1 (-113) 1 0 1 1 1 1 1 1 0 overflow!

Number Systems Codes Example in base 2 A way of representing a set of quantities or a set of symbols within a given base Example in base 2 decimal Binary BCD gray even parity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0000 0000 0000 0001 0000 0010 0000 0011 0000 0100 0000 0101 0000 0110 0000 0111 0000 1000 0000 1001 0001 0000 0001 0001 0001 0010 0001 0011 0001 0100 0001 0101 00000 10001 10010 00011 10100 00101 00110 10111 11000 01001 01010 11011 01100 11101 11110 01111

Number Systems Codes BCD Each decimal digit is encoded by four binary digits Motivation ease of conversion Examples 0001 0100 14 1001 0111 97 Gray Coding Each successive number differs by only 1 bit from previous counting with CMOS Karnaugh maps

Number Systems Codes ASCII Parity An extra bit is added to make the string always even or odd Motivation error checking ASCII b6b5b4 b3b2b1b0 000 001 010 011 100 101 110 111 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US SP ! “ # $ % & ‘ ( ) * + , - . / 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ DEL

Number Systems Codes 4 hex digits encode 216 characters Example Unicode 4 hex digits encode 216 characters Example

Number Systems Summary of topics Numbers and numerals Positional number systems Conversion between bases Binary number systems Binary addition, subtraction, and multiplication Representation of negative numbers Codes