Logic and Computer Design Fundamentals

Slides:



Advertisements
Similar presentations
Overview Part 2 – Combinational Logic Functions and functional blocks
Advertisements

A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Charles Kime © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part 3 – Control of.
Level ISA3: Information Representation
Overview Digital Systems, Computers, and Beyond
Overview Digital Systems and Computer Systems Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion Decimal Codes [BCD (binary.
SYEN 3330 Digital Systems Jung H. Kim Chapter 1 1 SYEN 3330 Digital Systems Chapter 1.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Overview Digital Systems, Computers, and Beyond
Overview Digital Systems, Computers, and Beyond
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
Introduction to Digital Logic Design
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Chapter 1 1 CPE 231 Digital Logic Introduction Dr. Gheith Abandah [Adapted from the slides of the textbook of Mano and Kime]
Numbering systems.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 1 – Number Systems and.
Logic and Digital System Design - CS 303
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Binary Values and Number Systems
Positional Notation 642 in base 10 positional notation is:
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
AEEE2031 Data Representation and Numbering Systems.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
1 CS151 Introduction to Digital Design Chapter 1 Lecture 3.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 1 Tom Kaminski & Charles R.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 8 – Memory Basics Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Overview 1-1 Information Representation
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)
Chapter 1 – Digital Systems and Information Logic and Computer Design Fundamentals.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Digital logic COMP214  Lecture 1 Dr. Sarah M.Eljack Chapter 1 1.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Unit 1 Introduction Number Systems and Conversion.
Chapter 1 Digital Systems and Binary Numbers
Logic and Computer Design Fundamentals
ENG2410 Digital Design “Introduction to Digital Systems”
6.
Digital Logic and Design
Lecture 3 – Binary Arithmetic
Digital Systems and Number Systems
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
SYEN 3330 Digital Systems Chapter 1 SYEN 3330 Digital Systems.
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.
Number Systems and Binary Arithmetic
Overview Digital Systems and Computer Systems
Some Information Instructor Details Main Book. Some Information Instructor Details Main Book.
Overview Digital Systems and Computer Systems
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Chapter Four Data Representation in Computers By Bezawit E.
COE 202: Digital Logic Design Number Systems Part 2
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Logic and Computer Design Fundamentals Chapter 1 – Digital Systems and Information Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

Overview Digital Systems, Computers, and Beyond Information Representation Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion Decimal Codes [BCD (binary coded decimal)] Alphanumeric Codes Parity Bit Gray Codes Chapter 1

DIGITAL & COMPUTER SYSTEMS - Digital System Takes a set of discrete information inputs and discrete internal information (system state) and generates a set of discrete information outputs. Discrete Information Processing System Discrete Inputs Discrete Outputs System State Chapter 1

example: ticket counter In a simple scenario, any digital system can be considered either as being combinational or sequential Combinational Circuit always gives the same output for a given set of inputs ex: adder always generates sum and carry, regardless of previous inputs Sequential Circuit stores information output depends on stored information (state) plus input so a given input might produce different outputs, depending on the stored information example: ticket counter advances when you push the button output depends on previous state useful for building “memory” elements and “state machines” 3-4

Combinational vs. Sequential Two types of locks. One combinational and the other sequential 30 25 20 5 10 4 1 8 15 Sequential Success depends on the sequence of values (e.g, 2R(13) , 1L(22) , 1R ( 3). Combinational Success depends only on the values, not the order in which they are set. 3-5

Digital Computer Example Memory Control unit CPU Datapath Inputs: Outputs: LCD keyboard, mouse, microphone screen, speakers Input/Output Synchronous or Asynchronous? Chapter 1

And Beyond – Embedded Systems Computers as integral parts of other products Examples of embedded computers Microcomputers Microcontrollers Digital signal processors Chapter 1

Embedded Systems Examples of Embedded Systems Applications Cell phones Automobiles Video games Copiers Dishwashers Flat Panel TVs Global Positioning Systems ( GPS) Chapter 1

Digital systems operate with signals which have only two values, known as logical 0 (zero) and logical 1 (one). Other equivalent ways of understanding and/or representing the two (i.e. binary) values of a digital system include: FALSE OFF DOWN LOW OPEN  TRUE ON UP HIGH CLOSED Digital logic circuits operate with binary values of current or voltage, that is, with two values representing the logical 0 and logical 1 of a digital system. 2-9

Computer is a binary digital system. Now we must define the different rages of logic 0 and logic 1 for different Semiconductor technologies. For example for MOS we may consider the following arrangement Chapter 1

floating state or tri-state ) As can be seen 0V ≤ Logic 0 ≤0.5 V 2.4 V ≤ logic 1 ≤ 2.9V Explanation: Illegal state ( high impedance, floating state or tri-state ) Chapter 1

What are other physical quantities Binary Values: Other Physical Quantities Voltage Magnetic Field Direction Surface Pits/Light What are other physical quantities represent 0 and 1? • CPU • Disk • CD • Dynamic RAM Electrical Charge Chapter 1

Lesson 1: number systems

For example the decimal number of 543.21 is represented as: Number Systems The decimal number system is employed in everyday arithmetic to represent number by strings of digits. For example depending on its position in the string, each digit has an associated value of an integer raised to the power of 10. For example the decimal number of 543.21 is represented as:  (5x122) +(4x101) +(3x100 ) +(2x10-1) +(1x10 -2) Chapter 1

The base is b=10 since we deal with the decimal number. Number Systems ( Cont.) The base is b=10 since we deal with the decimal number. The digits 5,4,3,2,1, satisfy the following condition:  0 ≤ 5,4,3,2,1 < 10 With the smallest possible digit being 0 while the largest possible digit being 9. Problem 1.1. What is the presentation of the following number 724.5? Chapter 1

j      An - 1An - 2 … A1A0 . A- 1 A- 2 … A- m  1 A- m Ai r  NUMBER SYSTEMS – Representation In general our notation for an arbitrary base (radix) r for a string of digits such : An - 1An - 2 … A1A0 . A- 1 A- 2 … A- m  1 A- m in which 0  Ai < r and . is the radix point can be presented as: j    i = n - 1 j = - 1   (Number) = Ai r i  Aj r r i = 0 j = - m (Integer Portion) + (Fraction Portion) Chapter 1

Now we are interested in 4 bases: Base 10 for which r =10 Number Systems ( Cont.) Now we are interested in 4 bases: Base 10 for which r =10 Base 2 for which r =2 Base 8 for which r = 8 Base 16 for which r = 16. Then by replacing the value of r ( some books use b instead of r) in the general equation we can obtain the equivalent of that number in the required base. Chapter 1

For each base we adopt the following conventions: Number Systems ( Cont.) For each base we adopt the following conventions:  Base 10 digits : 0,1,2,3,……9. Base 2, digits 0,1  Base 8 digits 0,1,2,3,4… 7  Base 16 digits 0,1,2,3,4,…8,9,A,B,C,D,E,F. Chapter 1

Are used for the above 16 bases. Number Systems ( Cont.) What is new is that : A represents 10 B represents 11 C represents 12 D represents 13 E represents 14 F represents 15 Are used for the above 16 bases. Chapter 1

We give “ Special names” to our bases: Base 10 is the decimal system Number Systems ( Cont.) We give “ Special names” to our bases: Base 10 is the decimal system Base 2 is the binary system Base 8 is the octal system Base 16 is the hexadecimal system. From now on we must specify the number system of interest in order to specify a number. Chapter 1

Lesson 2: number system conversion

Converting Decimal to Any base Repeatedly divide the number by base r and save the remainders. The digits for the new radix are the remainders in reverse order of their computation. Example: Convert 62510 to N2 Example: Convert 62510 to N16 Example: Convert 62510 to N8 625 – 512 = 113 => 9 113 – 64 = 49 => 6 49 – 32 = 17 => 5 17 – 16 = 1 => 4 1 – 1 = 0 => 0 Placing 1’s in the result for the positions recorded and 0’s elsewhere, 9 8 7 6 5 4 3 2 1 0 1 0 0 1 1 1 0 0 0 1

Converting Any base to Decimal To convert to decimal, use decimal arithmetic to form S (digit × respective power of base r). Example: Convert 110102 to N10:   Example: Convert 7258 to N10:   Example: Convert 72516 to N10:   Example: Convert A2E16 to N10: Powers of 2: 43210 110102 => 1 X 24 = 16 + 1 X 23 = 8 + 0 X 22 = 0 + 1 X 21 = 2 + 0 X 20 = 0 2610

Convert from base X to base Y First convert from base X to decimal Then convert from decimal to base Y Example: convert 1648 to hexadecimal Example: convert 1648 to binary Example: convert 1010012 to octal Chapter 1

The binary system The digit 0, 1 in the binary system have a special name. They are called bits. Bits represent the smallest memory element used in every computer. Problem 1.3 How many bits are needed to represent A decimal digit? A binary digit ? An octal digit? A hexadecimal digit? Chapter 1

Number Systems ( Cont.) In computer literature we define memories as:  2 10 = 1024 = 1 K ( Kilo) bytes  2 20 = 2 10 x 2 10 = 1 K x 1 K = 1M ( Mega)  2 30 = 2 10 x 2 10 x 2 10 = 1 K x 1 K x 1K = 1G ( giga) Chapter 1

A) binary to octal, hexadecimal and B) octal, hexadecimal to binary. Number Systems ( Cont.) Working with binary, octal and hexadecimal numbers is very easy. We can easily convert A) binary to octal, hexadecimal and B) octal, hexadecimal to binary. Chapter 1

Convert the following binary number into its octal equivalent. Number Systems ( Cont.) A For converting I. Binary to octal Group “ every three bits ( beginning from the right , ( LSB) and convert each group of 3 bits into octal. Problem 1.4 Convert the following binary number into its octal equivalent. (101111)2 = ( ?) 8 Chapter 1

Number Systems ( Cont.) II. Binary to hexadecimal Group “ every four bits” ( beginning from the right ( LSB) and convert each group of 4 bits into hexadecimal. Problem 1.5  (10100110) 2 = ( ?) 16 Chapter 1

Octal to binary “ ungroup every digital and convert it into 3 bits (b) for converting Octal to binary “ ungroup every digital and convert it into 3 bits Problem 1.6 ( 75) 8 = ( ?) 2 Hexadecimal to binary “ Ungroup” every digit and convert it into 4 bits. Problem 1.7  ( FE) 16 = ( ?) 2 Chapter 1

Numbers in Different Bases Good idea to memorize! Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) 00 00000 01 00001 02 00010 03 00011 04 00100 05 00101 06 00110 07 00111 08 01000 10 09 01001 11 01010 12 0A 01011 13 0B 01100 14 0C 01101 15 0D 01110 16 0E 01111 17 0F 10000 20 Chapter 1

Algorithm for converting from decimal into binary form Break every decimal into two: integer part . Fractional part For the integer part we follow the procedure that we outlined before: See the next page for details: Chapter 1

Number Systems ( Cont.) Quotient Remainder Digit Int ( N/2) = q0 N-2q0 = r 0 r0 Int ( q0/ 2) = q1 q0-2q1 = r 1 r 1 Int ( q1/2) = q2 q1-2q2 = r2 r2 Int ( q2/2) = q3 q2-2q3 = r3 r3 . Until q n+1 becomes zero Chapter 1

The resulting binary from is Number Systems ( Cont.) The resulting binary from is  rn rn-1 …..r3 r2 r1 r0 for the integer part. Perhaps an easier way to remember the algorithm would be the following way ( see the explanation in the class ). This can be generalized for converting the fractional part. Chapter 1

Number Systems ( Cont.) Problem 1.10  ( 0.625) 10 = ( ?) 2  ( 0.625) 10 = ( ?) 2 Problem 1.11  ( 28.21) 10 = ( ?) 2 Chapter 1

What does (543.21)10 represent in a) hexadecimal? b) octal? Number Systems ( Cont.) Problem 1.2 : What does (543.21)10 represent in a) hexadecimal? b) octal? Problem 1.10  ( 0.625) 10 = ( ?) 8 Problem 1.11  ( 28.21) 10 = ( ?) 16 Chapter 1

Lesson 3: number system arithmetic

Single Bit Binary Addition with Carry

Multiple Bit Binary Addition Extending this to two multiple bit examples: Augend 01100 10110 Addend +10001 +10111 Sum= ? Carries 00000 01100 Augend 01100 10110 Addend +10001 +10111 Sum 11101 101101

Number Systems ( Cont.) Problem 1.16  ( 01100) + ( 10001) =?????  ( 01100) + ( 10001) =????? Chapter 1

Single Bit Binary Subtraction with Borrow Given two binary digits (X,Y), a borrow in (Z) we get the following difference (S) and borrow (B): Borrow in (Z) of 0: Borrow in (Z) of 1: Z   X 1 - Y -0 -1 BS 0 0 1 1 0 1 Z   1 X - Y -0 -1 BS 11 1 0 0 0 1 1

Multiple Bit Binary Subtraction Extending this to two multiple bit examples: Minuend 10110 10110 Subtrahend - 10010 - 10011 Difference= ? Borrows 00000 00110 Minuend 10110 10110 Subtrahend –10010 –10011 Difference 00100 00011

Binary Multiplication

Arithmetic Operations Problem 1.15 ( 1011) x ( 101) see the solution in the class Chapter 1

Arithemtic operations in other systems Basically it is the same as decimal, except you need to use the tables of that system. Problem 1.12 ( 59F) 16 + ( E46) 16 = ???? Problem 1.13 ( 3FE) 16 + ( E2)16 = ???? Octal Multiplication Problem 1.14 Perform the multiplication ( 762 ) 8 x ( 45) 8 Chapter 1

Terms of Use All (or portions) of this material © 2008 by Pearson Education,Inc. Permission is given to incorporate this material or adaptations thereof into classroom presentations and handouts to instructors in courses adopting the latest edition of Logic and Computer Design Fundamentals as the course textbook. These materials or adaptations thereof are not to be sold or otherwise offered for consideration. This Terms of Use slide or page is to be included within the original materials or any adaptations thereof. Chapter 1