IST 4 Information and Logic

Similar documents
IST 4 Information and Logic

IST 4 Information and Logic

IST 4 Information and Logic

IST 4 Information and Logic

IST 4 Information and Logic

IST 4 Information and Logic

IST 4 Information and Logic

Boolean Algebra & Digital Logic

IST 4 Information and Logic

IST 4 Information and Logic

EEE130 Digital Electronics I Lecture #4

Computer Organization: Boolean Logic

Implementation of Boolean Logic by Digital Circuits

Switches: basic element of physical implementations

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

CS 226: Digital Logic Design

IST 4 Information and Logic

Combinational Logic Design Principles

IST 4 Information and Logic

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Chapter 2: Switching Algebra and Logic Circuits

IST 4 Information and Logic

Logic Design. Chapter 2: Introduction to Logic Circuits

IST 4 Information and Logic

Chapter 2 Combinational Logic Circuits

CprE 281: Digital Logic

IST 4 Information and Logic

Intro To Digital Logic

COS 140: Foundations of Computer Science

CNS 188a Computation Theory and Neural Systems. Monday and Wednesday 1:30-3:00 Moore 080

2 Application of Boolean Algebra Theorems (15 Points - graded for completion only)

Boolean algebra. Values

Lab 1 starts this week: go to your session

Digital Circuit And Logic Design I. Lecture 3

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

ECE/CS 250 Computer Architecture

IST 4 Information and Logic

Unit 8A Computer Organization. Boolean Logic and Gates

IST 4 Information and Logic

Chapter 2. Boolean Algebra and Logic Gates

Combinational Logic. By : Ali Mustafa

WEEK 2.1 BOOLEAN ALGEBRA

Unit 2 Boolean Algebra

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

Combinational Logic Fundamentals

Chapter 2 Boolean Algebra and Logic Gates

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Boolean Algebra, Gates and Circuits

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

1 Boolean Algebra Simplification

Boolean Algebra CHAPTER 15

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Chapter 2: Boolean Algebra and Logic Gates

Logic Gate Level. Part 2

CS61c: Representations of Combinational Logic Circuits

Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides

Week-I. Combinational Logic & Circuits

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

This form sometimes used in logic circuit, example:

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

DISCRETE STRUCTURES WEEK5 LECTURE1

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

10/14/2009. Reading: Hambley Chapters

Number System conversions

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Boolean Algebra and Logic Gates

CSE 20 Discrete Math. Algebraic Rules for Propositional Formulas. Summer, July 11 (Day 2) Number Systems/Computer Arithmetic Predicate Logic

211: Computer Architecture Summer 2016

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Logic Synthesis and Verification

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Adequate set of connectives, logic gates and circuits

EECS 1028 M: Discrete Mathematics for Engineers

CHAPTER1: Digital Logic Circuits Combination Circuits

02 Propositional Logic

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

CSC9R6 Computer Design. Practical Digital Logic

CHAPTER III BOOLEAN ALGEBRA

Slides for Lecture 10

What is Binary? Digital Systems and Information Representation. An Example. Physical Representation. Boolean Algebra

= x ( x 2 4 ) [factor out x] (2)

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1

Lecture A: Logic Design and Gates

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

CprE 281: Digital Logic

20. Combinational Circuits

INTRO TO I & CT. (Boolean Algebra and Logic Simplification.) Lecture # By: Department of CS & IT.

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA (CONT.)

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

Chapter 2 Combinational Logic Circuits

Contents. Chapter 2 Digital Circuits Page 1 of 30

Transcription:

IST 4 Information and Logic

T = today x= hw#x out x= hw#x due mon tue wed thr fri 31 M1 1 7 oh M1 14 oh 1 oh 2M2 21 oh oh 2 oh Mx= MQx out 28 oh M2 oh oh = office hours 5 3 12 oh 3 4 oh oh T midterms oh Mx= MQx due 19 oh oh 4 5 26 2 oh 5 oh oh oh

From ideas to physical implementation Today s most important slide Physical implementation with relay circuits Algorizms to small syntax boxes 0 1 0 0 1 1 1 0 Binary meets Boolean m-box Syntax boxes to Boolean algebra Boolean algebra to Physics

Boolean algebra functions s

Simple Boolean formula All the coefficients are 1 Feasible for an arbitrary (finite) Boolean algebra

Boolean Functions Given a Boolean algebra with a set of elements B A Boolean function is a mapping from {B} n {B} defined by a simple Boolean formula

Boolean Functions Start with a simple Boolean formula Assign all possible elements to the formula Two element Boolean Algebra B= {0,1} ab OR(a,b) 00 0 01 10 11 1 1 1

Boolean Functions 2 Elements Start with a simple Boolean formula Assign all possible elements to the formula Two element Boolean Algebra B= {0,1} ab 00 0 01 1 10 1 11 0 XOR(a,b)

Boolean Functions 4 Elements????

Boolean Functions 4 Elements

Boolean Functions 4 Elements????

Boolean Functions 4 Elements

Boolean Functions 4 Elements

Boolean algebra DNF s

DNF Disjunctive Normal Form Idea: Representing a Boolean function with a formula of a specific form

Representation of Boolean Functions Disjunctive (Additive) Normal Form (DNF): Sum of terms each term is Normal Sum of terms, each term is Normal Normal = contains all the variables or their complements

Representation of Boolean Functions Disjunctive (Additive) Normal Form (DNF): Sum of terms, each term is Normal Normal = contains all the variables or their complements No! Is it a DNF? This term is not normal

DNF E-Theorem Every Boolean function can be expressed in a DNF

DNF E-Theorem DNF E-Theorem: Every Boolean function can be expressed in a DNF. Proof: By the algorithm Apply DeMorgan Theorem (T4) until each negation is applied to a single variable Apply distributive axiom (A4) to get a sum of terms Augment a missing variable a to a term using (A2) multiplying by Use self absorption (L1) to eliminate duplicate terms

DNF Representation Theorem DNF Representation Theorem: DNF is a representation: two Boolean functions are equal if and only if their DNFs are identical. 5 + 2 + 1 + 111 =?? = 7+ 3 + 82+ 15 + 12 100 + 10 + 9 100 + 10 + 9

DNF Representation Theorem DNF Representation Theorem: DNF is a representation: two Boolean functions are equal if and only if their DNFs are identical. Proof: Easy direction: DNFs identical implies functions are equal Other direction: DNF are different implies functions are not equal Idea: consider the value of the functions for the 0-1 assignments it will be violated on 0-1 assignments

Idea: Being Normal is Boring... For which 0-1 assignments a normal term = 1? 011 101 110 101 100 A normal term is 1 for a single 0-1 assignment otherwise it is 0

Other direction: two different DNFs implies two different functions Proof: Idea: consider the value of the functions for the 0-1 assignments f = f = 1? f = 0? The boring gproperty: p A normal term is 1 for a single 0-1 assignment and 0 otherwise For any 0-1 assignment, either all terms are 0 or exactly one term is 1

Other direction: two different DNFs implies two different functions Proof: Idea: consider the value of the functions for the 0-1 assignments If two DNFs are different, there is a term that appears in one and does not appear in the other The 0-1 assignment that corresponds to this term results in a 1 for one DNF and in a 0 for the other. Q

Counting Functions DNF is a representation: Two Boolean functions are equal if and only if their DNFs are identical. Q1: How many different Boolean functions of n variables? Answer: This is the number of different DNFs of n variables Number of different normal terms of n variables? A normal term can appear/not appear in a DNF

DNF is a representation: Two Boolean functions are equal if and only if their DNFs are identical. How is the all-0 function represented? Answer: How is the all-1 function represented? Answer: everything...

More 0-1 Ideas Q2: Are Boolean functions determined by their 0-1 entries? Yes By the proof of the DNF Representation Theorem: Two DNFs are identical if and only if they are equal for all 0-1 assignments

Current State Representation Theorem (Stone 1936): Every finite Boolean algebra is isomorphic to a Boolean algebra of subsets of some finite set S. 0-1 Theorem: An identity is true for any finite Boolean algebra if and only if it is true for a two-valued (0-1) Boolean algebra. DNF Representation Theorem: DNF is a representation: ti Two Boolean functions are equal if and only if their DNFs are identical.

Boolean algebra DNF and magic boxes s

From ideas to physical implementation Today s most important slide Physical implementation with relay circuits Algorizms to small syntax boxes 0 1 0 0 1 1 1 0 Binary meets Boolean m-box Syntax boxes to Boolean algebra Boolean algebra to Physics

Boolean Functions 2 Elements Start with a simple Boolean formula Assign all possible elements to the formula Two element Boolean Algebra B= {0,1} ab 00 0 01 1 10 1 11 0 XOR(a,b)

Boolean Functions 4 Elements ab 00 0 01 1 10 1 11 0 XOR(a,b)

Represent a syntax box with formula? DNF is a way to express a syntax box using a formula Any syntax box? Only binary! When B={0,1}, namely BINARY every mapping is a Boolean function

DNF is a way to express a syntax box using a formula value 1 in the syntax table = a normal term in the DNF Idea: construct a DNF by adding the normal terms that correspond to f=1 ab 00 0 01 10 11 XOR(a,b) 1 1 0 a = 1 then a = 0 then

DNF is a way to express a syntax box using a formula value 1 in the syntax table = a normal term in the DNF Idea: construct a DNF by adding the normal terms that correspond to f=1 ab f(a,b) 00 1 01 10 11 1 1 0

Q:Can we reason about magic boxes using Boolean algebra? YES A Boolean algebra is a formal system for reasoning about S-boxes A MAGIC BOX: binary s-box that can compute binary s-box?

A magic box with Boolean algebra? Prove that it is magical? a b m 0 0 1 0 1 1 1 0 1 1 1 0

A magic box with Boolean algebra? Prove that it is magical? a b m 0 0 1 0 1 1 1 0 1 1 1 0

Analyzing the Magic Box using Boolean Algebra a b m 0 0 1 0 1 1 1 0 1 1 1 0 Can realize the operations of the algebra hence, can compute any DNF magical for Binary

The Magic Box Can Compute any Boolean Function???

The Magic Box Can Compute any Boolean Function 0 0

Algorithms Syntax Manipulation digit 1 digit 2 carry 2 symbol adder carry sum

Algorithms Syntax Manipulation digit 1 digit 2 1 0 carry 0 2 symbol adder 0 carry 1 sum

Algorithms Syntax Manipulation digit 1 digit 2 1 1 carry 1 2 symbol adder 0 carry 0 sum

Algorithms Syntax Manipulation 0 1 d1 d2 sum 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 c 2 symbol adder c s 0 1 carry 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1

Algorithms Syntax Manipulation 0 1 1 1 sum 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 2 symbol adder 0 0 0 1 carry 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1

1 1 1 0 0 0 1 1 c 2 symbol adder c c 2 symbol adder c c 2 symbol adder c c 2 symbol adder 0 s s s s 1101 + 1001 =?? 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 1

1 1 1 0 0 0 1 1 1 2 symbol adder 0 0 2 symbol adder 0 0 2 symbol adder 1 1 2 symbol adder 0 0 1 1 0 1101 + 1001 = 10110 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 13 + 9 = 22 1 1 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 1

c Algorithms Syntax Manipulation d1d d2d 2 symbol adder c s Can we write the DNF related to the sum and carry? d1 d2 c sum sum 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 1

c Algorithms Syntax Manipulation d1d d2d 2 symbol adder c s Can we write the DNF related to the sum and carry? 0 1 d1 d2 c sum 0 0 0 0 0 0 1 1 sum 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1

d1d Algorithms Syntax Manipulation d2d c 2 symbol adder c s sum d1 d2 c sum 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1

XOR of More Variables??? abc 000 0 001 010 011 1 1 0 100 1 101 0 110 0 111 1 XOR(a,b,c) 0 sum sum

d1 Algorithms Syntax Manipulation d2 c 2 symbol adder c s Can we write the DNF related to the sum and sum 0 1 carry? 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 carry 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 1

d1d Algorithms Syntax Manipulation d2d c 2 symbol adder c s carry d1 d2 c carry 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 carry 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 1 0 1 0 0 1 1 1 1

d1d Algorithms Syntax Manipulation d2d c 2 symbol adder c s carry 0 carry Can you simplify the carry?? 0 1 Distributive Absorption 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 1

d1d Algorithms Syntax Manipulation d2d c 2 symbol adder c s carry 0 carry carry When is the carry 1? 0 1 Two or more inputs are 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 1

The Carry Function abc MAJ(a,b,c) 000 0 001 0 010 0 011 1 100 0 101 1 110 1 111 1 carry

The Functions of the Adder d1 d2 c 2 symbol adder c s sum carry

The Functions of the Adder When was the first binary adder built? c d1 d2 2 symbol adder c s sum carry

The First Digital Adder George Stibitz, 1904-1995 1995 He worked at Bell Labs in New York relays, y tin In the fall of 1937 Stibitz used surplus can strips, flashlight bulbs, and other common items to construct his "Model K" K stands for kitchen...

George Boole 1815-1864 Trivia George Crum 1828-1914 What was invented first? Potato chips 1853 Manual Vacuum cleaner 1860 Source: wikipedia

Shannon 1916-2001

Shannon 1916-2001 Connection Between Boolean Calculus and Physical Circuits Shannon 1938 ~90 AB (After Boole) Relay on the edge controlled by a 0-1 variable 0 1

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 What is it computing? a b a b 2 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 5 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 a b c d e What is it computing? 5 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 a b c d e What is it computing? 5 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 a b c d e What is it computing? 5 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 a b c d e What is it computing? 5 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 a b c d e What is it computing? 5 relays

Connection Between Boolean Calculus and Physical Circuits Shannon 1938 a b d e

We need a language for S-boxes!! Feasibility Questions about building blocks? Given a set of building blocks: What can/cannot be constructed? Efficiency and complexity If feasible, how many blocks are needed? d? Algorizm? Next week: Implementing Boolean functions with relay circuits it