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.
Chapter 1 Binary Systems 1-1. Digital Systems
Digital Fundamentals Floyd Chapter 2 Tenth Edition
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.
Overview Digital Systems, Computers, and Beyond
Overview Digital Systems, Computers, and Beyond
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Digital Computers and Information
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
9/15/09 - L3 CodesCopyright Joanne DeGroat, ECE, OSU1 Codes.
1.6 Signed Binary Numbers.
Number Systems and Codes
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
Chapter 1 1 CPE 231 Digital Logic Introduction Dr. Gheith Abandah [Adapted from the slides of the textbook of Mano and Kime]
Chapter 1 Digital Systems and Binary Numbers
Lecture 6 Topics Character codes Error Detection and Correction
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Chapter 1 1 CPE 231 Digital Logic Introduction Dr. Gheith Abandah [Adapted from the slides of the textbook of Mano and Kime]
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.
1.7 BINARY CODES BCD Code (Binary –Coded Decimal ) BCD Addition
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 2 – Binary Codes.
CS151 Introduction to Digital Design
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.
CE1111 :Digital Logic Design lecture 01 Introduction Dr. Atef Ali Ibrahim.
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 –
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Chapter 1 Digital Systems and Binary Numbers
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
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.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Overview 1-1 Information Representation
Digital Logic & Design Adil Waheed Lecture 03. Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number.
Digital Logic Design Ch1-1 Chapter 1 Digital Systems and Binary Numbers Mustafa Kemal Uyguroğlu Digital Logic Design I.
Chapter 1 – Digital Systems and Information Logic and Computer Design Fundamentals.
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.
University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Yu Hen Hu and Yong-Chang Kim Fall 2002 Chapter 1 – Digital Computers and.
CEN200 Number systems DR. HAIKEL HICHRI. Gray codes  As we count up or down using binary codes, the number of bits that change from one binary value.
11001 / 101, / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the result.
Computer Representation of Information
Logic and Computer Design Fundamentals
Chapter 1 Digital Systems and Binary Numbers
Overview Part 2 – Combinational Logic Functions and functional blocks
Lecture No. 4 Number Systems
Digital Logic and Design
Lecture 3 – Binary Arithmetic
11001 / 101 , / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the.
Introduction to Chapter 2
Chapter 1 Digital Systems and Binary Numbers
SYEN 3330 Digital Systems Chapter 1 SYEN 3330 Digital Systems.
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Overview Digital Systems and Computer Systems
Digital Electronics & Logic Design
Complement Theory 1’s and, 2’s complement operation
Digital Logic & Design Lecture 03.
ECB2212-Digital Electronics Codes
ECE 331 – Digital System Design
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

Lesson 6

1-5 DECIMAL CODES - Binary Codes for Decimal Digits There are over 8,000 ways that you can chose 10 elements from the 16 binary numbers of 4 bits. A few are useful: Decimal 8,4,2,1 Excess3 8,4, - 2, - 1 Gray 0000 0011 0000 0000 1 0001 0100 0111 0100 2 0010 0101 0110 0101 3 0011 0110 0101 0111 4 0100 0111 0100 0110 5 0101 1000 1011 0010 6 0110 1001 1010 0011 7 0111 1010 1001 0001 8 1000 1011 1000 1001 9 1001 1 100 1111 1000

Binary Coded Decimal ( BCD) Packed BCD numbers Represent each decimal digit using 4 bits ( same as hexadecimal) Chapter 1

Binary Coded Decimal (BCD) The BCD code is the 8,4,2,1 code. 8, 4, 2, and 1 are weights BCD is a weighted code This code is the simplest, most intuitive binary code for decimal digits and uses the same powers of 2 as a binary number, but only encodes the first ten values from 0 to 9.  Example: 1001 (9) = 1000 (8) + 0001 (1) How many “invalid” code words are there? What are the “invalid” code words? Chapter 1

Warning: Conversion or Coding? Do NOT mix up conversion of a decimal number to a binary number with coding a decimal number with a BINARY CODE. 1310 = 11012 (This is conversion)  13  0001|0011 (This is coding) Chapter 1

BCD Arithmetic Given a BCD code, we use binary arithmetic to add the digits: 8 1000 Eight +5 +0101 Plus 5 13 1101 is 13 (> 9) Note that the result is MORE THAN 9, so must be represented by two digits! To correct the digit, subtract 10 by adding 6 modulo 16. 8 1000 Eight +5 +0101 Plus 5 13 1101 is 13 (> 9) +0110 so add 6 carry = 1 0011 leaving 3 + cy 0001 | 0011 Final answer (two digits) If the digit sum is > 9, add one to the next significant digit

Add 2905BCD to 1897BCD showing carries and digit corrections. BCD Addition Example Add 2905BCD to 1897BCD showing carries and digit corrections. 0001 1000 1001 0111 1 1 1 0 0001 1000 1001 0111 + 0010 1001 0000 0101 0100 10010 1010 1100 + 0000+ 0110+ 0110+ 0110 0100 1000 0000 0010 + 0010 1001 0000 0101

1-5 ALPHANUMERIC CODES - ASCII Character Codes American Standard Code for Information Interchange This code is a popular code used to represent information sent as character-based data. It uses 7-bits to represent: 94 Graphic printing characters. 34 Non-printing characters Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return) Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas). (Refer to Table 1 -5 in the text)

ASCII Properties ASCII has some interesting properties: Digits 0 to 9 span Hexadecimal values 3016 to 3916 . Upper case A - Z span 4116 to 5A16 . Lower case a - z span 6116 to 7A16 . Lower to upper case translation (and vice versa) occurs by flipping bit 6. Delete (DEL) is all bits set, a carryover from when punched paper tape was used to store messages. Punching all holes in a row erased a mistake!

ASCII

UTF-8 (UCS Transformation Format, UCS: Universal Character Set)

Lesson 7

PARITY BIT Error-Detection Codes A parity bit is an extra bit appended onto the code word to make the number of 1’s odd or even. Parity can detect all single-bit errors and some multiple-bit errors. A code word has even parity if the number of 1’s in the code word is even. A code word has odd parity if the number of 1’s in the code word is odd.

4-Bit Parity Code Example Fill in the even and odd parity bits: The codeword "1111" has even parity and the codeword "1110" has odd parity. Both can be used to represent 3-bit data. Even Parity Odd Parity Message Parity Message Parity - - 000 000 - - 001 001 - - 010 010 - - Even Parity Bits: 0, 1, 1, 0, 1, 0, 0, 1 Odd Parity Bits: 1, 0, 0, 1, 0, 1, 1, 0 011 011 - - 100 100 - - 101 101 - - 110 110 - - 111 111 - -

1-6 GRAY CODE What special property does the Gray code have in relation to adjacent decimal digits? Decimal 8,4,2,1 Gray 0000 0000 1 0001 0100 2 0010 0101 3 0011 0111 4 0100 0110 Answer: As we “counts” up or down in decimal, the code word for the Gray code changes in only one bit position as we go from decimal digit to digit including from 9 to 0. 5 0101 0010 6 0110 0011 7 0111 0001 8 1000 1001 9 1001 1000

Gray codes As we count up or down using binary codes, the number of bits that change from one binary value to the next varies. As we count from 000 up to 111 and “roll over” to 000, the number of bits that change between the binary values ranges from 1 to 3. For many applications, multiple bit changes as the circuit counts is not a problem. There are applications, however, in which a change of more than one bit when counting up or down can cause serious problems.

Gray codes One such problem is illustrated by an optical shaft-angle encoder shown in Figure. The encoder is a disk attached to a rotating shaft for measurement of the rotational position of the shaft. The disk contains areas that are clear for binary 1 and opaque for binary 0. An illumination source is placed on one side of the disk, and optical sensors, one for each of the bits to be encoded, are placed on the other side of the disk. When a clear region lies between the source and a sensor, the sensor responds to the light with a binary 1 output. When an opaque region lies between the source and the sensor, the sensor responds to the dark with a binary 0. Consider the situation when the sensor is in the boundary between 011 and 100

Gray codes As a solution, we use gray code:

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