Digital Logic Design Lecture # 2 University of Tehran.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

Addition and Subtraction. Outline Arithmetic Operations (Section 1.2) – Addition – Subtraction – Multiplication Complements (Section 1.5) – 1’s complement.
King Fahd University of Petroleum and Minerals
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Assembly Language and Computer Architecture Using C++ and Java
Level ISA3: Information Representation
Signed Numbers.
Assembly Language and Computer Architecture Using C++ and Java
ECE 331 – Digital System Design
ECE 301 – Digital Electronics Number Systems and Conversion, Binary Arithmetic, and Representation of Negative Numbers (Lecture #10) The slides included.
1 CSE-221 Digital Logic Design (DLD) Lecture-1: Digital Systems & Number Systems.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Dr. Bernard Chen Ph.D. University of Central Arkansas
Digital Logic Design Lecture # 8 University of Tehran.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Simple Data Type Representation and conversion of numbers
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Numbering systems.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Data Representation – Binary Numbers
BINARY ARITHMETIC Binary arithmetic is essential in all digital computers and in many other types of digital systems.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
IT253: Computer Organization
Digital Logic Design Lecture # 3 University of Tehran.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Lecture 1 Binary Representation Topics Terminology Base 10, Hex, binary Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement.
Number Systems. Why binary numbers? Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer.
Integer Conversion Between Decimal and Binary Bases Conversion of decimal to binary more complicated Task accomplished by –Repeated division of decimal.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
1 CS103 Guest Lecture Number Systems & Conversion Bitwise Logic Operations.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
ECE 331 – Digital System Design
Number systems, Operations, and Codes
CSC 221 Computer Organization and Assembly Language
Digital Logic Design Lecture # 9 University of Tehran.
Number Systems & Operations
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
Digital Logic Lecture 3 Binary Arithmetic By Zyad Dwekat The Hashemite University Computer Engineering Department.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Lecture 2 Binary Arithmetic Topics Terminology Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement August 26, 2003 CSCE 211.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Phys 4330 Digital ElectronicsBinary System Digital circuits process signals that contain just two voltage levels or states, labeled logic "0" and logic.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Introduction To Number Systems Binary System M. AL-Towaileb1.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
PHY 201 (Blum)1 Shift registers and Floating Point Numbers Chapter 11 in Tokheim.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
1 CS 352 Introduction to Logic Design Lecture 1 Ahmed Ezzat Number Systems and Boolean Algebra, Ch-1 + Ch-2.
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.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
CPE 201 Digital Design Lecture 2: Digital Systems & Binary Numbers (2)
Unit 1 Introduction Number Systems and Conversion.
Digital Logic & Design Adil Waheed Lecture 02.
Digital Logic & Design Dr. Waseem Ikram Lecture 02.
COMPUTING FUNDAMENTALS
Fundamentals & Ethics of Information Systems IS 201
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Data Representation in Computer Systems
Digital Logic & Design Lecture 02.
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Digital Systems and Binary Numbers
Digital Logic Design (CSNB163)
Binary to Decimal Conversion
Introduction To Number Systems
COE 202: Digital Logic Design Number Systems Part 2
Presentation transcript:

Digital Logic Design Lecture # 2 University of Tehran

Outline Design Flow Transistors and Switches NMOS PMOS Number Systems Binary System Sign and Magnitude System 2’s Complement System

Design Flow

Design Flow (continued…) When designing a digital system, partitioning of the whole comes first. While doing so we run into so called sub-systems of our main system which are simpler definition-wise. Considering the figure shown in the latter slide our design procedure which is normally a Top-Down procedure, starts by dividing the digital system needed down to components we already have and/or if a component that has not yet been designed is reached, we move lower into the levels of design until we have all needed parts.

Design Follow (continued…) Implementation being the procedure of putting together smaller parts in order to form what is needed is a Bottom-Up procedure. In the process of design, we would have a very hard and almost impossible job if we were to put together -for all essential components- their transistors and wire them together. Hence we consider a few modules with a more defined application in order to decrease the labor in this repetitive task.

Design Follow (continued…) The first set of modules would be gates, now instead of having a million transistors we have only 200’000 to 300’000 gates. Making meaningful structures helps a designer who reached such a package in his/her process not to go any further. A decrease in component variation is seen as we sink deeper in the design level. We only have 2 types of transistors, while 30 to 40 types of components can be recognized.

Design Follow (continued…) Even in high levels of design, a designer may need to work with transistors or gates at some levels of his work. In comparison with building a house by putting together built blocks and connecting them with bricks, this can be called glue logic.

Transistors and Switches Transistors can be simply defined as on-off switches. In the CMOS technology we have 2 main types of transistors: NMOS and PMOS.

Transistors and Switches (continued…) The only thing that concerns us here is whether or not the transistor conducts at a special instance The NMOS type conducts when a ‘1’ logic value is fed to it’s gate input while the same happens for a PMOS type when a ‘0’ logic value is fed Because of the transistors-being our building bricks- has 2 states, we will have to be working in base 2.

Number Systems Binary Sign and Magnitude 2’s Complement

Binary System Weight of each position in the Binary System:

Binary System (continued…) Conversion of a binary number to it’s equivalent decimal number: As shown in the latter slide, each position has a weight which is multiplied by the 0 or 1 in that position. The sum of the products is equal to the equivalent decimal number. Example: (1011) 2 =1*2 0 +1*2 1 +0*2 2 +1*2 3 =(11) 10

Binary System (continued…) Conversion of a decimal number to it’s equivalent binary number: For this conversion, we attempt to subtract each weight from the left most digit in order to find the decimal number equivalent in binary. Another procedure for this conversion is multiple divisions and collecting the remainders, the first digit resulted is the nearest digit to the binary point. Example:

Binary System (continued…) A decimal number can also consist of an integer and a fractional part, which sum up to make the whole number. Example: (29.61) 10 =(?) 2 (29) 10 = 1* * * * *2 0 =(11101) 2 (0.61) 10 = 1* * * * * *2 -6 =( ) 2

Binary System (continued…) Another way is to use multiplication to find the fractional part. Example: The integer part can be exactly found whereas the fractional part may not. In such a case we should find three binary digits to represent each decimal digit to maintain accuracy.

Binary System (continued…) In our usage of the binary number system-although we are benefiting because of it’s relativity to transistors-some problems such as those seen in data transmission can occur. This where the use of hexadecimal and octal number systems is considered useful. To do conversions from base 2 to base 8(16), each 3(4) bits in base 2 must be converted into it’s equivalent in base 8(16). Example:

Binary System (continued…) Binary Arithmetic: Summing numbers in base 2 can be considered the same as decimal summing (The same rules apply to summing in base 8 and 16). The main problems can occur when doing subtractions. But even in this case the borrowing is just as it is in decimal numbers. Example:

Sign and Magnitude System Our need for negative number is obvious in arithmetic, because of this need and considering the fact that in base 2 we can use nothing but 0s and 1s for our representations, we define the left-most digit as the number’s sign digit. The definition constructs the Sign and Magnitude representation of numbers. In this representation all digits except the left-most construct the magnitude of the number, while the left-most digit being 1 shows that the number is negative or positive otherwise.

Sign and Magnitude System (continued…) The main problem remaining in this system and it’s arithmetic, is that we have to use 2 completely different algorithms and thus 2 completely different circuits for addition and subtraction.

2’s Complement System With another look at the arithmetic in our decimal number system: We have reached our aim which was finding a new way of subtraction with the same steps as addition. And we have done it through eliminating the borrowing procedure.

2’s Complement System (continued…) We have actually found a new way to negate 37 and that is the result of subtracting it from 99 and adding 1 to it. The same steps can be applied to the binary number system: This representation for negative numbers is used in the 2’s Complement System.

2’s Complement System (continued…) 2’s complementing a number is consisted of complementing it and then adding 1. The same rule as the sign and magnitude representation for distinguishing positive numbers from negative ones applies in the 2’s complement system. In the 2’s complement system, the positive numbers have the same form as they have in the sign and magnitude system.

2’s Complement System (continued…) 2’s complementing a negative number is performed as starting from the right-most digit until the first ‘1’ is reached and then complementing the rest of the digits. Addition Example: Subtraction Example: