Docsity

Analog and Digital C - Boolean Algebra, Study notes of Digital & Analog Electronics

Partial preview of the text

Download Analog and Digital C - Boolean Algebra and more Study notes Digital & Analog Electronics in PDF only on Docsity!

Boolean Algebra

 (^) Digital circuits  (^) Boolean Algebra  (^) Two-Valued Boolean Algebra  (^) Boolean Algebra Postulates  (^) Precedence of Operators  (^) Truth Table & Proofs  (^) Duality

Introduction

Boolean algebra forms the basis of logic circuit design. Consider very simple but common example: if (A is true) and (B is false) then print “the solution is found”. In this case, two Boolean expressions (A is true) and (B is false) are related by a connective ‘and’. How do we define these? This and related things are discussed in this chapter. In typical circuit design, there are many conditions to be taken care of (for example, when the ‘second counter’ = 60, the ‘minute counter’ is incremented and ‘second counter’ is made 0. Thus it is quite important to understand Boolean algebra. In subsequent chapters, we are going to further study how to minimize the circuit using laws of Boolean algebra (that is very interesting…)

Digital Circuits

 (^) Advantages of Digital Circuits over Analog Circuits:  (^) more reliable (simpler circuits, less noise-prone)  (^) specified accuracy (determinable)  (^) but slower response time (sampling rate)  (^) Important advantages for two-valued Digital Circuit:  (^) Mathematical Model – Boolean Algebra  (^) Can help design , analyse , simplify Digital Circuits.

Boolean Algebra

 (^) Boolean Algebra named after George Boole who used it to study human logical reasoning – calculus of proposition.  (^) Events : true or false  (^) Connectives : a OR b; a AND b, NOT a  (^) Example: Either “it has rained” OR “someone splashed water”, “must be tall” AND “good vision”. What is an Algebra? (e.g. algebra of integers) set of elements (e.g. 0,1,2,..) set of operations (e.g. +, -, *,..) postulates/axioms (e.g. 0+x=x,..)

Boolean Algebra Postulates

 (^) The set B contains at least two distinct elements x and y.  (^) Closure : For every x, y in B ,  (^) x + y is in B  (^) x. y is in B  (^) Commutative laws : For every x, y in B ,  (^) x + y = y + x  x. y = y. x A Boolean algebra consists of a set of elements B , with two binary operations {+} and {.} and a unary operation {'}, such that the following axioms hold:

Boolean Algebra Postulates

 (^) Associative laws : For every x, y, z in B ,  (^) (x + y) + z = x + (y + z) = x + y + z  (^) (x. y). z = (x. y). z = x. y. z  (^) Identities (0 and 1):  (^) 0 + x = x + 0 = x for every x in B  (^) 1. x = x. 1 = x for every x in B  (^) Distributive laws : For every x, y, z in B ,  (^) x. (y + z) = (x. y) + (x. z)  (^) x + (y. z) = (x + y). (x + z)

Precedence of Operators

Precedence (highest to lowest):

For Evaluating Boolean expression

 Parentheses()

 NOT - ~

 AND -.

 OR - +

Truth Table

 (^) Provides a listing of every possible combination of inputs and its corresponding outputs.  (^) Example (2 inputs, 2 outputs): x y x. y x + y 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 1 INPUTS OUTPUTS … … … …

Proof using Truth Table

 (^) Can use truth table to prove by perfect induction.  (^) Prove that: x. (y + z) = (x. y) + (x. z) (i) Construct truth table for LHS & RHS of above equality. (ii) Check that LHS = RHS Postulate is SATISFIED because output column 2 & 5 (for LHS & RHS expressions) are equal for all cases. x y z y + z x.(y + z) x.y x.z (x.y)+(x.z) 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1

Solving it yourself (Exercise 3.1)

Q. Use truth table to prove the following. (a) A’.B’ + A.B’ + A.B = A + B’ (b) A.B.C + A’.B.C + A’.B.C’ = B.C + A’.B

Duality

 (^) Duality gives free theorems – “two for the price of one”. You prove one theorem and the other comes for free!  (^) If (x+y+z)' = x'. y. 'z' is valid, then its dual is also valid: (x. y. z)' = x'+y'+z’  (^) If x + 1 = 1 is valid, then its dual is also valid: x. 0 = 0

Basic Theorems of Boolean Algebra

 (^) Apart from the axioms/postulates, there are other useful theorems.

  1. Idempotency. (a) x + x = x (b) x. x = x Proof of (a): x + x = (x + x). 1 (identity) = (x + x). (x + x') (complementarity) = x + x. x' (distributivity) = x + 0 (complementarity) = x (identity)

Basic Theorems of Boolean Algebra

  1. DeMorgan. (a) (x + y)' = x'. y' (b) (x. y)' = x' + y'
  2. Consensus. (a) x. y + x'. z + y. z = x. y + x'. z (b) (x+y). (x'+z). (y+z) = (x+y). (x'+z)

Basic Theorems of Boolean Algebra

 (^) Theorems can be proved using the truth table method. (Exercise: Prove De-Morgan’s theorem using the truth table.)  (^) They can also be proved by algebraic manipulation using axioms/postulates or other basic theorems.