CMSC250 Fall 2018 Circuits 1 1.

Slides:



Advertisements
Similar presentations
(CSC 102) Discrete Structures Lecture 5.
Advertisements

ADDER, HALF ADDER & FULL ADDER
Digital Circuits.
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
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.
Binary Numbers.
CS 105 Digital Logic Design
Chapter 1 Number Systems and Codes 1. Outline 1. NUMBER SYSTEMS AND CODES 2. DIGITAL ELECTRONIC SIGNALS AND SWITCHES 3. BASIC LOGIC GATES 4. PROGRAMMABLE.
Dr. Bernard Chen Ph.D. University of Central Arkansas
CS231 Fundamentals1 Fundamentals What kind of data do computers work with? – Deep down inside, it’s all 1s and 0s What can you do with 1s and 0s? – Boolean.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Binary Numbers.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
1 Introduction to Abstract Mathematics Applications : Digital Logic Circuits 2.4 and Number Systems 2.5 Instructor: Hayk Melikya
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
1 CMSC 250 Chapter 1, con't., Combinatorial circuits.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
1 Boolean Logic & Number Systems Today: Some Announcements First Hour: Introduction to Logic –Section 1.2, 1.3 of Katz’s Textbook –In-class Activity #1.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
CHAPTER 4 Combinational Logic
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
Combinational Circuits
Chapter 1: Binary Systems
Number Representation and Arithmetic Circuits
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.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
CS231: Computer Architecture I Laxmikant Kale Fall 2002.
1 CMSC 250 Circuits. 2 CMSC 250 Find Boolean formula for: p, q & r are the variables. pqroutput
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Programmable Logic Controller
Unit 1 Introduction Number Systems and Conversion.
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Invitation to Computer Science, C++ Version, Fourth Edition
Digital Logic & Design Adil Waheed Lecture 02.
Digital Logic & Design Dr. Waseem Ikram Lecture 02.
Data Representation in Computer Systems
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Computer Architecture CST 250
Fundamentals & Ethics of Information Systems IS 201
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
University of Gujrat Department of Computer Science
Invitation to Computer Science, Java Version, Third Edition
MIPS ALU.
Chapter 4 Combinational Logic
Copyright © Cengage Learning. All rights reserved.
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
ELL100: INTRODUCTION TO ELECTRICAL ENGG.
Data Representation in Computer Systems
Number Systems Decimal (base 10) { }
Digital Logic & Design Lecture 02.
CPS120: Introduction to Computer Science
Digital Systems and Binary Numbers
Chapter Four Data Representation in Computers By Bezawit E.
ECE 352 Digital System Fundamentals
Binary to Decimal Conversion
Copyright © Cengage Learning. All rights reserved.
XOR Function Logic Symbol  Description  Truth Table 
Numbers and Arithmetic and Logical Operation
Presentation transcript:

CMSC250 Fall 2018 Circuits 1 1

Logic == Math? What calculations can we do with logic? Add, subtract, multiply? George Boole – 1800’s. Boolean logic Claude Shannon – 1937. Logic == circuits == math T = 1 p v q == p+q p v ~q F = 0 p ^ q == p*q is ~ p == (1-q) p + (1-q)

Find Boolean formula for: p, q & r are the variables. p q r output 1 3 For each output row which has a 1, form a statement which is true only for the values of the inputs in that row. For this example, it would be rows 1, 2, and 4, and the statements would be (p  q  r) (p  q  r) (p  q  r) Then OR them all together. For this example the result would be (p  q  r)  (p  q  r)  (p  q  r) This procedure always works.

Find Boolean Formula For each row with output 1 obtain “mini-formula” which is 1 exactly on that row. OR together all of the mini-formulas 111, 110, and 100 all output 1 p^q^r, p^q^~r, p^~q^~r (p^q^r)(p^q^~r)(p^~q^~r) 4

Basic logic gates AND gate: OR gate: NOT gate: 5 We can recast everything we’ve done so far in terms of circuits. These circuits are what are actually inside a computer and allow it to work. AND, OR, and NOT gates really exist! 5

Basic logic gates AND gate: OR gate: NOT gate: 6 We can recast everything we’ve done so far in terms of circuits. These circuits are what are actually inside a computer and allow it to work. AND, OR, and NOT gates really exist! 6

Circuit to Boolean formula Given this circuit, convert to logic

Circuit to Boolean formula Given this circuit, convert to logic p v ~(p ^ r)

Draw a circuit for: p, q & r are inputs. Simplify before building the circuit. p q r output 1 For each output row which has a 1, form a statement which is true only for the values of the inputs in that row. For this example, it would be rows 1, 2, and 4, and the statements would be (p  q  r) (p  q  r) (p  q  r) Then OR them all together. For this example the result would be (p  q  r)  (p  q  r)  (p  q  r) This procedure always works. 9

Number conversions Different number system bases are used when convenient some commonly-used bases are 10 (decimal), 2 (binary), 8 (octal), 16 (hexadecimal) the base tells how many different numerals are used the base also determines the value of each place Conversions from anything to base 10 use the definition of the number system Conversions from base 10 to anything use repeated integer division Circuits can calculate or solve arithmetic functions with base 2 numbers. So we take a detour to base 2. On the board: In base 10: 268 = 2 * 10^2 + 6 * 10^1 + 8 * 10^0. This ONLY uses the digits 0 through 9 A number in base 2 only uses the digits 0 and 1. In base 2: some number like 101101 = 1 * 2^5 + 0 * 2^4 + 1 * 2^3 + 2 * 2^2 + 1 * 2^0 10

Addition of binary numbers Carry if the number would be too large for the number system- if it is greater than 1 1001 + 10 1001 + 11 1011 + 10 1101 + 111 1011 1100 1101 10100 11

Addition of octal and hexadecimal numbers Carry if the number would be too large for the number system (larger than 7 or 15) 7238 + 128 2658 + 338 ABC16 + 1216 CDE16 + ED16 7358 3208 ACE16 DCB16 Explain: Octal is base 8, therefore the octal digits are 0 through 7. Any value which is larger than 7 must result in a carry to the next digit position to the left. Hexadecimal is base 16, so ten digit symbols 0-9 aren’t enough to represent all the hexadecimal digits. So we use letters A, B, C, D, E, and F to represent the hexadecimal digits with values 10, 11, 12, 13, 14, and 15. Hexadecimal is commonly used in computer science, since expressing numbers in binary is tedious. However, computer memory is often organized in terms of bytes, which are 8 bits. Therefore two hexadecimal digits can be used to indicate the first four bits and the second four bits of any byte, more conveniently than 8 bits. For example, the binary number 01101101 is 6D in hexadecimal. Similarly, it's 155 in octal. Octal is less common but sometimes used as well. 12

Two's complement To represent negative values in binary: Find the binary equivalent of the absolute value. Pad on the left to completely fill the bits in the specified bit width Switch all of the 1's to 0's and 0's to 1's. Add 1 to the result. Example: find the 8-bit two's complement representation of -43: 4310 = 1010112 001010112 110101002 110101012 = -4310 13

Using a circuit for adding two bits input output p q carry sum 1 Write as a logic expression Translate to circuits The key is that we’ve translated arithmetic in base 2 to truth tables, now we can do circuits! Note order of rows; this is not a truth table. 14

Half adder Sum = (x v y) ^ ~ (x ^ y) Carry = (x ^ y)

Full adder Three bits in (x, y, previous carry)

Parallel adders Chain these half adders and full adders together for multi-bit addition A3A2A1A0 + B3B2B1B0 = S3S2S1S0 X3 Y3 X2 Y2 This performs addition of 2 3-bit numbers! X1 Y1

Topic not covered Simplifying circuits: there are techniques that exist (which are complex). 18