CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Similar documents
Unit-IV Boolean Algebra

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Logic Design: Part 2

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

EE292: Fundamentals of ECE

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

2.6 BOOLEAN FUNCTIONS

Number representations

DKT 122/3 DIGITAL SYSTEM 1

BINARY SYSTEM. Binary system is used in digital systems because it is:

X Y Z F=X+Y+Z

IT 201 Digital System Design Module II Notes

Chapter 1 Review of Number Systems

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

MACHINE LEVEL REPRESENTATION OF DATA

Microcomputers. Outline. Number Systems and Digital Logic Review

CHW 261: Logic Design

SWITCHING THEORY AND LOGIC CIRCUITS

Experiment 4 Boolean Functions Implementation

UNIT 2 BOOLEAN ALGEBRA

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Binary logic. Dr.Abu-Arqoub

Number System. Introduction. Decimal Numbers

Chapter 3 Simplification of Boolean functions

DIGITAL SYSTEM DESIGN

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee


LOGIC CIRCUITS. Kirti P_Didital Design 1

Gate Level Minimization

Simplification of Boolean Functions

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Boolean Analysis of Logic Circuits

Digital Fundamentals

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Number Systems CHAPTER Positional Number Systems

SE311: Design of Digital Systems

Summary. Boolean Addition

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Boolean Algebra. P1. The OR operation is closed for all x, y B x + y B

1. Mark the correct statement(s)

Binary Values. CSE 410 Lecture 02

Digital Systems and Binary Numbers

Outline. What Digit? => Number System. Decimal (base 10) Significant Digits. Lect 03 Number System, Gates, Boolean Algebra. CS221: Digital Design


ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Chapter Overview. Welcome to Assembly Language

Computer Organization

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

Digital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand

Data Representation 1

Chapter 10 Binary Arithmetics

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Computer Organization and Programming

Injntu.com Injntu.com Injntu.com R16

Read this before starting!

Circuit analysis summary

CS & IT Conversions. Magnitude 10,000 1,

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

Read this before starting!

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

Computer Logical Organization Tutorial

Combinational Circuits

Combinational Circuits Digital Logic (Materials taken primarily from:

Level ISA3: Information Representation

ELCT201: DIGITAL LOGIC DESIGN

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

ELCT201: DIGITAL LOGIC DESIGN

Korea University of Technology and Education

R.M.D. ENGINEERING COLLEGE R.S.M. Nagar, Kavaraipettai

Numbering systems. Dr Abu Arqoub

D I G I T A L C I R C U I T S E E

Gate Level Minimization Map Method

Variable, Complement, and Literal are terms used in Boolean Algebra.

EEE130 Digital Electronics I Lecture #4_1

History of Computing. Ahmed Sallam 11/28/2014 1

COMP Overview of Tutorial #2

Code No: 07A3EC03 Set No. 1

Chapter 2 Number System

CMPE223/CMSE222 Digital Logic Design. Positional representation

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

Chapter Overview. Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 1: Basic Concepts. Printing this Slide Show

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

Read this before starting!

Octal & Hexadecimal Number Systems. Digital Electronics

TOPICS. Other Number Systems. Other Number Systems 9/9/2017. Octal Hexadecimal Number conversion

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

Number System (Different Ways To Say How Many) Fall 2016

ENGIN 112 Intro to Electrical and Computer Engineering

Transcription:

CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Outline Data Representation Binary Codes Why 6-3-1-1 and Excess-3? Basic Operations of Boolean Algebra Examples Basic Theorems Commutative, Associative, and Distributive Laws Simplification Theorems Multiplying Out and Factoring DeMorgan s Laws

Data Representation (1/2) Each numbering format, or system, has a base, or maximum number of symbols that can be assigned to a single digit.

Data Representation (2/2) Binary: 1 1 1 1 0 1 0 1 Octal: 365 Decimal: 245 Hexadecimal: F5

Binary Numbers (1/7) A computer stores instructions and data in memory as collections of electronic charges. 1 = on voltage at output of electronic device is high (saturated). 0 = off voltage at output of electronic device is zero.

Binary Numbers (2/7) Each digit in a binary number is called a bit. In a binary number, bits are numbered starting at zero on the right side, and increasing toward the left. The bit on the left is called the most significant bit (MSB), and the bit on the right is the least significant bit (LSB).

Binary Numbers (3/7) 1 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 MSB LSB

Binary Numbers (4/7) Unsigned binary integers Can only be positive or zero Translating unsigned binary integers to decimal dec=(d n-1 *2 n-1 )+(D n-2 *2 n-2 )+..+(D 1 *2 1 )+(D 0 *2 0 ) 1 1 1 1 0 1 0 1 (n=8) D 7 =1, D 6 =1, D 5 =1, D 4 =1, D 3 =0, D 2 =1, D 1 =0, D 0 =1 dec=2 7 +2 6 +2 5 +2 4 +2 2 +2 0 =128+64+32+16+4+1=245

Binary Numbers (5/7) Translating unsigned decimal integers to binary Example: translating 37 to binary Division Quotient Remainder 37/2 18 1 18/2 9 0 9/2 4 1 4/2 2 0 2/2 1 0 1/2 0 1 The result is 100101.

Binary Numbers (6/7) Binary Addition Beginning with the lowest (rightmost) order pair of bits. Proceed bit by bit For each bit pair. 0+0=0 0+1=1 1+0=1 1+1=10

Binary Numbers (7/7) Binary addition (cont) Carry: 1 + 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 1 (4) (7) Bit position: 0 0 0 0 1 0 1 1 7 6 5 4 3 2 1 0 (11)

Value Range For an n-bit unsigned binary number, the range is 0~2 n -1: 2 n different values. 2 bits: 4 values (0 3) 3 bits: 8 values (0 7) 4 bits: 16 values (0 15)... 8 bits (a byte): 256 values (0 255) 10 bits: 1024 values (0 1023)

Hexadecimal Integers (1/6) hexadecimal numbers are often used to represent computer memory address and instructions. A hexadecimal digit ranges from 0 to 15 (total of sixteen). The letters of the alphabet are used to represent 10 through 15. where A=10, B=11, C=12, D=13, E=14, and F=15

Hexadecimal Integers (2/6) Decimal Hexadecimal Binary 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Each hexadecimal digit means a four binary bit string. Every four binary bit string can be mapped to a hexadecimal digit.

Hexadecimal Integers (3/6) If we can break up a byte (8 bits) into halves, the upper and lower halves, each half can be represented by a hexadecimal digit. A byte could then be represented by two hexadecimal digits, rather than 8 bits. In general, any binary number can be split into four-bit groups, starting from right. Each such a group can be translated into hexadecimal digit. The result hexadecimal is much shorter than the binary equivalent.

Hexadecimal Integers (4/6) 101101010011110010100 0001 0110 1010 0111 1001 0100 1 6 A 7 9 4 101101010011110010100 16A794 Note when you are finding four bit groups, begin from the right.

Hexadecimal Integers (5/6) Converting unsigned hexadecimal to decimal. dec=(d n-1 *16 n-1 )+(D n-2 *16 n-2 )+..+(D 1 *16 1 )+(D 0 *16 0 ) F5 245 D 1 =F, D 0 =5 dec=f*16 1 +5*16 0 =15*16+5*1 =240+5 =245

Hexadecimal Integers (6/6) Converting unsigned decimal to hexadecimal Division Quotient Remainder 422/16 26 6 26/16 1 A 1/16 0 1 The result is 1A6.

Signed Integers (1/9) Signed integers can negative, zero and positive. The most significant bit in binary numbers indicates the number s sign. 0 means positive or zero 1 means negative When you are using signed binary numbers, the number of bits must be specified.

Signed Integers (2/9) When a signed binary is positive, it can be used as if it was an unsigned binary. When it is negative, two s complement is used the most often. Two s complement (TC) notation works like the negating operation TC(TC(number)) = number, [ -(-number)=number] TC(number)+number=0, [-number+number=0]

Signed Integers (3/9) Given an eight-bit number 0000 0001, its two s complement is 1111 1111 Starting value 0000 0001 Step1: reverse the bits: 1111 1110 Step 2: add 1 1111 1111 The two s complement representation of -1.

Signed Integers (4/9) Two s complement of hexadecimal Reversing a hexadecimal digit is subtracting the digit from 15 6A3D 95C2+1 95C3 95C3 6A3C+1 6A3D

Signed Integers (5/9) For a signed hexadecimal number, it is negative if its most significant digit is greater than 7. Otherwise it is zero or positive.

Signed Integers (5/9) Converting signed binary to decimal MSB=1, this binary is in two s complement notation. Get its two s complement (positive equivalent). Convert to decimal. Make the decimal negative. MSB=0, this binary can be treated as an unsigned binary.

Signed Integers (6/9) Starting value: 1111 0000 Step1: reverse the bits: 0000 1111 Step2: add 1 0000 1111+1 Step3: its two s complement: 0001 0000 Step4: convert to decimal 16 Step5: make the decimal neg: -16

Signed Integers (8/9) How to Convert signed decimal to binary? Convert signed decimal to hexadecimal? Convert signed hexadecimal to decimal?

Signed Integers (9/9) Maximum and Minimum Values: For an n-bit signed binary number, the range is -2 n-1 2 n-1-1

Addition of Signed Binary Numbers 13-12 (use five bits) =13+(-12) =01101+TC(01100) =01101+(10011+1) =01101+10100 =1 00001 =00001 (1/3) The carry from the MSB is discarded. in signed binary number addition.

Addition of Signed Binary Numbers (2/3) 13+12 (We still use 5 bits) =01101+01100 =11001 The result is negative!! It is an overflow.

Addition of Signed Binary Numbers (3/3) -12-13 (Still 5 bits) =TC(12)+TC(13) =TC(01100)+TC(01101) =(10011+1)+(10010+1) =10100+10011 =1 00111 =00111 The carry from the MSB is discarded. The result is positive!! It is an overflow.

Binary Codes (1/2) Binary codes: how to represent decimal digits. Weighted codes BCD codes (8-4-2-1): each decimal digit is represented by its four-bit binary equivalent. 937: 1001 0011 0111 6-3-1-1 codes: weights are 6, 3, 1, 1 937: 1100 0100 1001

Binary Codes (2/2) Non-weighted codes Excess 3: obtained from the 8-4-2-1 code by adding 3 (0011) to each the codes. 937: 1100 0110 1010 2-out-of-5: exactly 2 out of 5 bits are 1, has error-checking properties. 937: 11000 01001 10010 Gray code: the codes for successive decimal digits differ in exactly one bit 456: 0110 1110 1010

Why Excess-3? Excess-3 codes 0 0011 1 0100 2 0101 3 0110 4 0111 5 1000 6 1001 7 1010 8 1011 9 1100 For a decimal digit D, complement its code results in the code of 9-D.

Why 6-3-1-1? (1/3) 8-4-2-1 codes 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 6-3-1-1 codes 0 0000 1 0001 2 0011 3 0100 4 0101 5 0111 6 1000 7 1001 8 1011 9 1100

Why 6-3-1-1? (2/3) Lets consider the situations of 1 bit corrupted. 0000 0001 0010 0100 1000 In 8-4-2-1 coding method, all 0001, 0010, 0100, and 1000 are valid codes. In 6-3-1-1 coding method, only 0001, 0100, and 1000 are valid codes.

Why 6-3-1-1? (3/3) Lets define the concept of error rate at 1 bit corrupted to be the number of possible valid codes after being corrupted divided by 4. For example, for 0000, the error rate at 1 bit corrupted is 100% when using 8-4-2-1 codes and 75% when using 6-3-1-1 codes.

Basic Operations of Boolean Algebra (1/11) All the switching devices are two-state devices. Boolean algebra is useful in analyzing switching devices and circuits.

Basic Operations of Boolean Algebra (2/11) Basic elements: Three tools in analyzing switching devices Boolean expression: A+B, A B Truth table Logic diagram Inputs and outputs can only be 0 s or 1 s.

Basic Operations of Boolean Algebra (3/11) Basic operations: AND Logic expression: C=A B or C=AB Truth table A B C=A B 0 0 0 0 1 0 1 0 0 1 1 1 Logic diagram

Basic Operations of Boolean Algebra (4/11) Basic operations (cont) OR Logic Expression: C=A+B Truth Table Logic diagram A B C=A B 0 0 0 0 1 1 1 0 1 1 1 1

Basic Operations of Boolean Algebra (5/11) Basic operations (cont) complement Logic Expression: C=A Truth Table A C 0 1 1 0 Logic diagram

Basic Operations of Boolean Algebra (6/11) Rules of precedence: Brackets NOT AND OR

Basic Operations of Boolean Algebra (7/11) Example 1: Logic expression AB +C Order of execution: B AB AB +C Logic diagram

Basic Operations of Boolean Algebra (8/11) Example 1 (cont) Truth Table How many inputs: three How many rows: 2 3 =8 How many outputs: one

Basic Operations of Boolean Example 1 (cont) Algebra (9/11) A B C B AB AB +C 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1

Basic Operations of Boolean Algebra (10/11) Example 2: Boolean expression: [A(C+D)] +BE Logic diagram:

Basic Operations of Boolean Algebra (11/11) Example 2 Truth Table How many inputs: five How many rows: 2 5 =32 How many outputs: one

Basic Theorems Operations with 0 and 1 X+0=X X 1=X X+1=1 X 0=0 Idempotent laws X+X=X X X=X Involution law (X ) =X Laws of complementarity X+X =1 X X =0

Commutative, Associative, and Distributive Laws Commutative laws XY=YX X+Y=Y+X Associative laws (XY)Z=X(YZ) (X+Y)+Z=X+(Y+Z)=X+Y+Z XYZ=1 iff X=Y=Z=1 X+Y+Z=0 iff X=Y=Z=0 Distributive laws X(Y+Z)=XY+XZ X+YZ=(X+Y)(X+Z)

Simplification Theorems (1/3) XY+XY =X (X+Y)(X+Y )=X X+XY=X X(X+Y)=X (X+Y )Y=XY XY +Y=X+Y

Simplification Theorems (2/3)

Simplification Theorems (3/3) Z=[A+B C+D+EF][A+B C+(D+EF) ] X=A+B C and Y=D+EF Z=(X+Y)(X+Y )=X=A+B C Z=(AB+C)(B D+C E )+(AB+C) X=B D+C E and Y=(AB+C) Z=Y X+Y=Y+X=B D+C E +(AB+C)

Multiplying and Factoring (1/4) Sum-of-products All products are the products of single variables or complements. AB +CD E+AC E A+B +C+D E (A+B)CD+EF X Product-of-sums All sums are the sums of single variables or complements. (A+B )(C+D +E)(A+C +E ) (A+B)(C+D+E)F (A+B)(B C+D) X

Multiplying and Factoring (2/4) Multiplying (A+B)(B+C)(D +B)(ACD +E) =(ACD +B)(ACD +E) =ACD +BE

Multiplying and Factoring (3/4) Factoring AB +C D =(AB +C )(AB +D) =(A+C )(B +C )(A+D)(B +D)

Multiplying and Factoring (4/4) A sum-of-products expression can always be realized directly by one or more AND gates feeding a single OR gate at the circuit output. A product-of-sums expression can always be realized by one or more OR gates feeding a single AND gate at the circuit output.

DeMorgan s Laws (1/2) (X+Y) =X Y (XY) =X +Y (X 1 + X 2 + X 3 + + X n ) =X 1 X 2 X 3 X n (X 1 X 2 X 3 X n ) = X 1 + X 2 + X 3 + + X n

DeMorgan s Laws (2/2) [(A +B)C ] =(A +B) +(C ) =AB +C [(A+B )C ] (A+B)(C+A) =(A B+C)(A+B)A C =(A B+C)(A BC ) =A BC