ELL100: INTRODUCTION TO ELECTRICAL ENGG.

Slides:



Advertisements
Similar presentations
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
Advertisements

Assembly Language and Computer Architecture Using C++ and Java
Assembly Language and Computer Architecture Using C++ and Java
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Simple Data Type Representation and conversion of numbers
ReVieW Combinational & Sequential Logic Circuit EKT 221 / 4 DIGITAL ELECTRONICS II.
Computers Organization & Assembly Language
Binary Numbers.
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
Basic Arithmetic (adding and subtracting)
CSI-2111 Computer Architecture Ipage Revision  Objective : To examine basic concepts of: –2.1 Numbering Systems –2.2 Binary Numbers –2.3 Boolean.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
1 DLD Lecture 18 Recap. 2 Recap °Number System/Inter-conversion, Complements °Boolean Algebra °More Logic Functions: NAND, NOR, XOR °Minimization with.
Course contents Chapter 1 - section 1.6 Chapter 2 - all sections Chapter – 4.7, and 4.12 Chapter , Chapter 6 - all sections.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
ece Parity Used to check for errors Can be either ODD or EVEN Left most bit used as the indicator For EVEN, insert a 0 or a 1 so as to make the.
Introduction To Number Systems Binary System M. AL-Towaileb1.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
CEC 220 Digital Circuit Design
Number Representation and Arithmetic Circuits
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
ELECTRICAL ENGINEERING: PRINCIPLES AND APPLICATIONS, Third Edition, by Allan R. Hambley, ©2005 Pearson Education, Inc. Chapter 7 Logic Circuits.
1 Digital Logic Design (41-135) Chapter 5 Number Representation & Arithmetic Circuits Younglok Kim Dept. of Electrical Engineering Sogang University Spring.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Chap 3. Combinational Logic Design
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Digital Systems Section 8 Multiplexers. Digital Systems Section 8 Multiplexers.
Basic Digital Logic Systems
Fundamentals & Ethics of Information Systems IS 201
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
University of Gujrat Department of Computer Science
Principles & Applications
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Digital Logic and Design
Basics Combinational Circuits Sequential Circuits
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Chapter 4 Combinational Logic
Lecture 4 Sums of Product Circuits Simplification
Digital Electronics & Logic Design
BASIC & COMBINATIONAL LOGIC CIRCUIT
King Fahd University of Petroleum and Minerals
Number Systems Decimal (base 10) { }
Numbers and Arithmetic
Boolean Algebra.
Week 7: Gates and Circuits: PART II
ECEG-3202 Computer Architecture and Organization
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Instructor: Alexander Stoytchev
Digital Systems Section 12 Binary Adders. Digital Systems Section 12 Binary Adders.
13 Digital Logic Circuits.
Adders and Subtractors
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Instructor: Alexander Stoytchev
Logic Circuits I Lecture 3.
Instructor: Alexander Stoytchev
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
XOR, XNOR, and Binary Adders
ECE 352 Digital System Fundamentals
CMSC250 Fall 2018 Circuits 1 1.
Instructor: Alexander Stoytchev
XOR Function Logic Symbol  Description  Truth Table 
Karnaugh Maps (K maps).
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 8: Digital Electronics – Combinational Logic by Muhazam Mustapha, November 2011.
CSE 370 – Winter Number syst.; Logic functions- 1
Presentation transcript:

ELL100: INTRODUCTION TO ELECTRICAL ENGG. Course Instructors: J.-B. Seo, S. Srirangarajan, S.-D. Roy, and S. Janardhanan Department of Electrical Engineering, IITD

Number systems Decimal, Octal, Hex, binary systems Decimal number system Octal (0,1,…,7): Base 8 = 448 = 40 = 4

Number systems Decimal, Octal, Hex, binary systems Hex (0,1,…9,A, B, C,…,F): Base 16 Binary = 256 = 224

Most significant & least significant bit For any number system (non-fractional part) Right most: Least significant digit/bit (LSB) Left most: Most significant digit/bit (MSB) Decimal: 4153231 Binary: 1010001 Hex: AE143

Conversion from Decimal to Base N Divide the decimal number by N. Reminder is LSB If the quotient is not divisible, the conversion is done. Else, repeat step 1 using the quotient as a new decimal number. New reminder is the next LSB 30 1 27 13 6 3 1 16 492 16 30 2 55 2 27 2 13 2 6 2 3 480 16 54 26 12 6 2 12 ···· C 14 ···· E 1 1 1 1

Ones’ complement (1’s complement) Suppose a 8-bit (binary) integer How can we express – 127? To obtain the 1’s complement of a binary number: flip all the bits : the MSB denotes the negative sign

One’s complement value Bits Unsigned value One’s complement value 0000 0001 1 0000 0010 2 0000 0000 0111 1110 126 0111 1111 127 1000 0000 128 –127 1000 0001 129 –126 1111 1101 253 –2 1111 1110 254 –1 1111 1111 255 –0

Ones’ complement Adding two values: Align the values on the LSB Add, propagating any carry to the bit one position left. If the carry extends past the end of the word, it is said to have "wrapped around", a condition called an “end-around carry” When this occurs, the bit must be added back in at the right-most bit. 0001 0110 22 0001 0110 22 + 0000 0011 3 + 1111 1111 – 0 25 0001 1001 1 0001 0101 1 0001 0110 22

Ones’ complement 6 – 19 = 19 + 3 = 19 – (-3) = 0000 0110 6 0001 0011 Subtraction uses “end-around borrow” if necessary. Subtract it from the LSB 6 – 19 = 19 + 3 = 19 – (-3) = 0000 0110 6 0001 0011 19 – 0001 0011 19 – 1111 1100 – 3 1 1111 0101 25 1 0001 0111 1 1 1111 0100 –13 0001 0110 22

Two’s complement (2’s complement) Two’s complement of an N-bit number: Its complement with respect to 2N  The two’s complement of three-bit number 010 1000 010 + 110 = 1000 – 010 110  Find one’s complement and add `1’ to the LSB 101 + 001 = 110 – 2  No negative zero: 000 111 + 001 = 000

Two’s complement Decimal value Binary (2’s compl.) Two’s complement 0000 0000 1 0000 0001 1111 1111 2 0000 0010 1111 1110 126 0111 1110 1000 0010 127 0111 1111 1000 0001 –128 1000 0000 –127 –126 –2 –1

Two’s complement (2’s complement) Adding two’s complement numbers requires no special processing 15 – 5 = 15 + (-5) 15 – (-5) = borrow 0000 1111 15 0000 1111 15 + 1111 1011 – 5 – 1111 1011 – 5 0000 1010 10 0001 0100 20 Carry bit is ignored

Two’s complement (2’s complement) Overflow 104 + 45 = (-103) + (-69) = -172 0110 1000 104 1001 1001 – 103 + 0010 1101 45 – 1011 1011 – 69 1001 0101 149 0101 0100 If the sum of two positive numbers yields a negative result, the sum has overflowed. If the sum of two negative numbers yields a positive result, the sum has overflowed. Otherwise, the sum has not overflowed.

Gates Truth table Truth table Simplest Logic Gate – also known as the complement or the invertor Truth table Simplest Logic Gate – also known as the complement or the invertor Truth table

Gates AND gate OR gate Truth table Truth table

Gates NAND gate NOR gate Truth table Truth table

Gates XOR Gate XNOR Truth table Truth table

Boolean Algebra – 1

Boolean Algebra – 2

Boolean Algebra – 2

Boolean Algebra – 2

DeMorgan’s theorem Example =

Logic circuit analysis

Karnaugh map (K-map) The sum of products (minterm) Three-variable Karnaugh map

Karnaugh map (K-map) The sum of products (minterm) Three-variable Karnaugh map

Karnaugh map (K-map) The sum of products (minterm) Three-variable Karnaugh map

Karnaugh map (K-map) The sum of products (minterm) Three-variable Karnaugh map

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map) K-map with four variables

Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number

Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number or 0, and 1.

Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number

Example – 1 Design a circuit to take a 4-bit number ABCD and produce a single output Y that is true only if the input represents a prime number

Example – 2 LED seven-segment display is used to indicate decimal digits, 0,1,…9. a f b g e c 8 9 d 6 7 4 5 2 3 1

Example – 2 LED seven-segment display is used to indicate decimal digits, 0,1,…9. a f b g e c 8 9 d 6 7 4 5 2 3 1

Example – 2 LED seven-segment display is used to indicate decimal digits, 0,1,…9. a f b g e c 8 9 d 6 7 4 5 2 3 1

Example – 2 1 1 1 1 1 1 x x x x x x 1 1 Don’t care condition

Example – 2 1 1 1 1 1 1 x x x x x x 1 1

Example – 2

Karnaugh map (K-map) The sum of products (minterm) The product of sums (maxterm) (_ _ _) + (_ _) + (_ _ _ ) (_ + _ + _)(_ + _)(_ + _ + _ ) Minterm Maxterm

Karnaugh map (K-map)

Karnaugh map (K-map) To convert a Boolean function F from SoP to PoS Find in SoP form Find in PoS form

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Karnaugh map (K-map)

Half-Adder

Full-Adder

Full-Adder

Full-Adder  Sum  Carry-out

Full-Adder

4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

4-bit Binary Adder How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

4-bit Binary Adder Four 1-bit FA Or Eight 1-bit HA How can you build ? A3A2A1A0 + B3B2B1B0 ------------------------------- S3S2S1S0 -------------------------------- Cout, Cin How can you build ? Four 1-bit FA Or Eight 1-bit HA

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M)

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  ?

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  output flips B

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  output flips B Select bit (M) = 0  output = B

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  Enable Subtract Select bit (M) = 0  Enable Add

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  Enable Subtract Select bit (M) = 0  Enable Add

Design a 4-bit adder that can also subtract the two numbers ? A3A2A1A0 -/+ B3B2B1B0 ------------------------------- Design a 4-bit adder that can also subtract the two numbers ? Algorithm You will need a selection bit to select between the 2 operations – ADD or SUB If SUB, then first Flip all the bits of B, and find B’ Add B’ to A (like the normal ADDER) Add 1 to the Sum Select bit (M) = 1  Enable Subtract Select bit (M) = 0  Enable Add