Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers

Similar documents
Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

Chapter 1. Binary Systems 1-1. Outline. ! Introductions. ! Number Base Conversions. ! Binary Arithmetic. ! Binary Codes. ! Binary Elements 1-2

Chapter 1 CSCI

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations.

Why digital? Overview. Number Systems. Binary to Decimal conversion

Conversions between Decimal and Binary

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

What is Binary? Digital Systems and Information Representation. An Example. Physical Representation. Boolean Algebra

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

10/14/2009. Reading: Hambley Chapters

Computer Architecture, IFE CS and T&CS, 4 th sem. Representation of Integer Numbers in Computer Systems

Digital Systems Roberto Muscedere Images 2013 Pearson Education Inc. 1

CHAPTER 7. Exercises 17/ / /2 2 0

ENGIN 112 Intro to Electrical and Computer Engineering

12/31/2010. Digital Operations and Computations Course Notes. 01-Number Systems Text: Unit 1. Overview. What is a Digital System?

Binary addition example worked out

Digital Electronics Part 1: Binary Logic

Hakim Weatherspoon CS 3410 Computer Science Cornell University

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

Cs302 Quiz for MID TERM Exam Solved

CPE100: Digital Logic Design I

CHAPTER 2 NUMBER SYSTEMS

ECE260: Fundamentals of Computer Engineering

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

Combinational Logic. By : Ali Mustafa

CpE358/CS381. Switching Theory and Logical Design. Summer

Chapter 7 Logic Circuits

ENGIN 112 Intro to Electrical and Computer Engineering

Numbers and Arithmetic

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

THE LOGIC OF COMPOUND STATEMENTS

of Digital Electronics

Numbers and Arithmetic

CSE 241 Digital Systems Spring 2013

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018

ENG2410 Digital Design Introduction to Digital Systems. Fall 2017 S. Areibi School of Engineering University of Guelph

ECE/CS 250 Computer Architecture

Fundamentals of Digital Design

CSEN102 Introduction to Computer Science

Week No. 06: Numbering Systems

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

SAU1A FUNDAMENTALS OF DIGITAL COMPUTERS

Combinational Logic Design Arithmetic Functions and Circuits

Logic. Combinational. inputs. outputs. the result. system can

NUMBERS AND CODES CHAPTER Numbers

CSE 20 DISCRETE MATH. Fall

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

CprE 281: Digital Logic

NUMBER SYSTEMS. and DATA REPRESENTATION. for COMPUTERS (PROBLEM ANSWERS)

Computer Organization I Test 1/Version 1 CMSC 2833 Autumn 2007

Review for Test 1 : Ch1 5

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

convert a two s complement number back into a recognizable magnitude.

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

UNIT II COMBINATIONAL CIRCUITS:

hexadecimal-to-decimal conversion

COMBINATIONAL LOGIC FUNCTIONS

Digital Systems and Information Part II

We say that the base of the decimal number system is ten, represented by the symbol

Four Important Number Systems

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Systems I: Computer Organization and Architecture

University of Florida EEL 3701 Summer 2015 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Tuesday, 30 June 2015

Intro To Digital Logic

What does such a voltage signal look like? Signals are commonly observed and graphed as functions of time:

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

CSE 20 Discrete Math. Algebraic Rules for Propositional Formulas. Summer, July 11 (Day 2) Number Systems/Computer Arithmetic Predicate Logic

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation

Introduction to Digital Logic Missouri S&T University CPE 2210 Subtractors


ECE 372 Microcontroller Design

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Lecture 2 Review on Digital Logic (Part 1)

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

ECE380 Digital Logic. Positional representation

Digital Logic and Design (Course Code: EE222) Lecture 1 5: Digital Electronics Fundamentals. Evolution of Electronic Devices

Building a Computer Adder

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

UNIVERSITI TENAGA NASIONAL. College of Information Technology

2.5 정수와알고리즘 (Integers and Algorithms)

CSCI 255. S i g n e d N u m s / S h i f t i n g / A r i t h m e t i c O p s.

Sample Test Paper - I

Chapter 2. Digital Logic Basics

Base-b representations of integers. (b 진법표현 ) Algorithms for computer arithmetic: Euclidean algorithm for finding GCD s.

Boolean Algebra & Digital Logic

Logic and Boolean algebra

Logic Theory in Designing of Digital Circuit & Microprocessor

ALU (3) - Division Algorithms

CPE100: Digital Logic Design I

Number Bases. Ioan Despi. University of New England. August 4, 2013

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

Chapter 1 :: From Zero to One

Transcription:

Unit Numbering Systems Fundamentals of Logic Design EE2369 Prof. Eric MacDonald Fall Semester 2003 Digital Systems Overview Digital Systems are Home PC XBOX or Playstation2 Cell phone Network router Data processing Communications Control Air Conditioning control in the home Transmission controller under the hood Elevator controller Why Digital Systems? Accurate depending on number of digits used CD Music is digital Vinyl Records were analog DVD Video and Audio mp3 (quality depends on sampling/amount of bits) Reliable Error Correction Capabilities Discrete Values with Large Noise Margin Technology can be implemented as fast, cheap CMOS semiconductors Levels of Design Abstraction High Level System Design (senior class) Design the box and decide how components are connected Middle Level Logic Design (this class!) Design the chips inside the box Low Level Circuit Design (senior class) Design the macros used in the chip by logic designers Design with transistors and implement physically Numbering systems Dissecting Decimal Numbers Western World Decimal or base 0 The system that we all know and take for granted 0 probably picked because of the number of fingers on human hands Egyptians used base 0 but only accumulatively Romans used base 0 and had some positional notation Mayans Vigesimal or base 20 had concept of zero and had a modern positional notation Allowed for representing a large range (very small to very large numbers) positional notation allows for long arithmetic Not sure why they picked 20? Doesn t matter really. Computers and Digital Systems Binary or base 2 easy to implement physically high or low voltage on wire allows for use of Boolean math and philosopher s logic true or false = high or low = one or zero = on or off 0 2 4. 2 5 0 000 s 00 s 0 s s. /0 s /00 s 0 3 0 2 0 0 0. 0-0 -2 Note: All digits confined to one of 0 characters (0,, 2, 3, 4, 5, 6, 7, 8, 9)

Positional Notation Dissecting Binary Numbers 0 2 4. 2 5 0 a m a 2 a a 0 a - a l 0 0. 2 = 2.75 0 8 s 4 s 2 s s. /2 s /4 s 0 m 0 2 0 0 0. 0-0 -l Base is 0 so R = 0 (R could be any positive integer) N = a m * R m + a 2 * R 2 + a * R + a 0 * R 0 + a - * R - + a -l * R -l 2 3 2 2 2 2 0. 2-2 -2 Note: All digits confined to one of 2 characters (0 or ) Computers love this Converting Binary to Decimal (ex) Converting Binary to Decimal (ex2) 0 2 = 0 0 0. 2 = 2.75 0 8 s 4 s 2 s s 8 + 0 + 2 + = 0 8 s 4 s 2 s s. /2 s /4 s 8 + 4 + 0 + 0 + ½ + ¼ = 2.75 Converting Binary to Decimal (ex3) Dissecting Hexadecimal Numbers 0 0 0. 0 2 = 8.25 0 8 s 4 s 2 s s. /2 s /4 s 8 + 0 + 0 + 0 + 0 + ¼ = 8.25 3 E 6 256 s 6 s s 6 2 6 6 0 = 38 0 A = 0 B = C = 2 D = 3 E = 4 F = 5 Note: All digits confined to one of 6 characters (0 to 9 and A to F) 2

Why Hexadecimal? Binary to Hexadecimal Easy! One Hexadecimal digit represents four binary digits Hexadecimal is more human readable Can quickly convert large binary numbers to hexadecimal and back by inspection Decimal 0 2 3 4 5 6 7 8 Hexadecimal 0 2 3 4 5 6 7 8 Binary 0000 000 000 00 000 00 00 0 000 00 00 B C 5 9 9 00 0 a 00 2 3 b c d 0 0 BC5 much easier to read than 0000 4 e 0 5 f Long Hand Conversion Long Hand Conversion 2 78 2 39 2 9 2 9 2 4 2 2 2 0 From Decimal Integer to any other Base Convert 78 0 to binary remainder 0 - a0 - s least significant digit first remainder - a 2 s remainder - a2 4 s remainder - a3 8 s remainder 0 - a4 6 s remainder 0 - a5 32 s Answer: 000 remainder - a6 64 s most significant digit last 0.75 x 2 ().50 => a - 0.50 x 2 ().00 => a -2 0.00 x 2 (0).00 => a -3 finished when answer is 0.00 From Decimal Fraction to any other Base 0.75 decimal to binary Answer: 0.0 Long Hand Conversion Long Hand Binary Addition General Guidelines To convert to decimal, use positional notation equation To convert to/from arbitrary bases (say base n to m) first convert n to decimal second convert from decimal to m To convert numbers with integers and fractions treat them separately with the previous long hand conversions concatenate the results Hexadecimal to/from binary can be done by inspection Octal (base 8) to/from binary can also be done by inspection Addition Table 0 + 0 = 0, c=0 0 + =, c=0 + 0 =, c=0 + = 0, c= But Carry One to next column + 2 0 = 6 0 = +00 0 00 = 8 0 3

Long Hand Binary Subtraction Long Hand Binary Multiplication Subtraction Table 0-0 = 0 0 - = - 0 = - = 0 - But borrow One from next column 2 0 = 6 0 = - 00 00 = 6 0 Multiplication Table 0 * 0 = 0 0 * = 0 * 0 = 0 * = * 2 0 = 6 0 = + * 00 0000 0000 00000 =72 0 Long Hand Binary Division Long Hand Binary Division 24 divided by 6 00 = 4 0 0 0 0 000 0 = 0 000-00 - 000-000 = 0 remainder 78 divided by 7 Representing Negative Numbers Sign and Magnitude system Sign and Magnitude system intuitive human readable good for multiplication, bad for addition/subtraction One s complement less intuitive used by Cray computers Two s complement even less intuitive (at first) good for addition / subtraction used almost exclusively in industry sign bit = - 0 = + 000 2 = -6 0 magnitude (same in this case) 4

One s complement Two s complement 2 = -6 0 formal conversion => N = (2 n ) N Example (2 n -) N = 6-000 simple conversion => flip all bits 00 2 = -6 0 formal conversion => N* = N + Example (2n-) N = 6-000 add + 0000 00 Two s complement simple convert Find first from the right 00000 2 = 6 0 invert each digit to the left 0000 2 = 6 0 000 2 = 6 0 00 2 = 6 0 until you reach the left end Two s Complement Addition Addition is identical to unsigned binary addition except for possibility of overflow and need for ignoring sign carry bit Formal subtraction operation unnecessary negate one number to negative two s complement add the numbers (same as subtraction) Overflow adding two positive numbers or negative numbers can result in overflow check for sign change to detect overflow the sum of two positive numbers should be positive the sum of two negative numbers should be negative Binary Codes BCD clock example Binary Coded Decimal (8-4-2- weighted code) used with simple LED displays (watch display, etc) 6-3-- Weighted code Excess-3 code 2-out-of-5 code Gray code ASCII 2 : 4 5 000 000 : 000 00 values 00 through not legal values 5

Other codes 4b/5b code 00 MBit Ethernet 6-3-- code distributed more evenly less absolute error for a single bit corrupted Excess-3 code distributed more evenly more likely to have a one in the 4 th position 2-out-of-5 code error checking convenient if one or three bits high, you have an error. Gray Code interesting in cases where next symbol is a single increment or decrement away results in less switching hazards when feeding combinatorial logic less power / longer battery life only switch one line at time Good for finite state machine state assignments (later chapter) 4 bits translated to 5 bits (6 symbols out of 32) Extra symbols for start, stop and idle Error correction for single bit corruption Error detection for two more corrupted bits 00 MBit Ethernet actually runs at 25 MBits 6