Boolean Algebra Lecture Notes: Introduction to Boolean Functions and Expressions, Study notes of Algebra

From these values, we will (1) use Boolean algebra to build expressions that transform bit ... f(a,b)=(a + (ab)) + (b(a + b)) (cf Boolean Cheat Sheet).

Typology: Study notes

2021/2022

Uploaded on 09/07/2022

adnan_95
adnan_95 🇮🇶

4.3

(39)

918 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Boolean Algebra
Lecturer: Guillaume Beslon
Computer Science and Information Technologies - INSA Lyon
Fall 2021
1/ 16
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Boolean Algebra Lecture Notes: Introduction to Boolean Functions and Expressions and more Study notes Algebra in PDF only on Docsity!

Boolean Algebra

Lecturer: Guillaume Beslon

Computer Science and Information Technologies - INSA Lyon

Fall 2021

Interpretation of bits as Boolean values

Two elementary values: I (^0) ⇒ “false” I (^1) ⇒ “true” From these values, we will (1) use Boolean algebra to build expressions that transform bit vectors into other bit vectors (i.e. an information into another information) and (2) implement them as logical circuits. → Two types of expressions/circuits: I (^) Combinatorial expressions/circuits : output bits only depend on values currently available on input bits. I (^) Sequential expressions/circuits : The circuit is considered to have a state (i.e., a memory of its past activity/inputs). Output bits depend both on values currently available on input bits + circuit state.

Boolean Cheat Sheet^1

  • absorbing elements: a + 1 = 1, a· 0 = 0
  • neutral elements: a + 0 = a, a· 1 = a
  • idempotence: a + a = a, a·a = a
  • tautology/antilogy: a + a = 1, a·a = 0
  • commutativity: a + b = b + a, ab = ba
  • distributivity: a + (bc) = (a + b)(a + c), a(b + c) = ab + ac
  • associativity: a + (b + c) = (a + b) + c = a + b + c, a(bc) = (ab)c = abc
  • De Morgan’s law: ab = a + b, a + b = a·b
  • others: a + (ab) = a, a + (ab) = a + b, a(a + b) = a, (a + b)(a + b) = a
  • Always keep in mind: ab 6 = ab, a + b 6 = a + b (^1) Probably one of the rare things to be known by heart

Boolean expressions

Using the basic operations, we can form Boolean expressions.

A literal is a Boolean (potentially negated) variable in an expression (e.g.,: if a, b, c are 3 boolean variables, we can write the Boolean expression ab + cb, which has 4 literals).

Any function from Bn^ to B can be described with a Boolean expression.

Any function from Bn^ to Bm^ can be described with m Boolean expressions.

Any boolean expression with n variables represents a function from Bn^ to B.

Blackboard Examples

Normal forms

A Boolean function can be expressed with many different Boolean expressions: e.g., if f (a, b) = ab, then we also have f (a, b) = a + b or f (a, b) = (a + (ab)) + (b(a + b)) (cf Boolean Cheat Sheet) We thus are interested in two normal forms (forme canonique):

I (^) Disjunctive normal form (DNF) : a disjunction of conjunctions of literals (sum of products → sop):

abc + ab + ab

I (^) Conjunctive normal form (CNF) : a conjunction of disjunctions of literals (product of sums → pos):

(a + b + c)·(a + b + c)·(a + b + c)

From Boolean functions to CNF

  1. write f (a, b, c) in DNF

a b c f (a, b, c) f (a, b, c) 0 0 0 1 0 0 0 1 0 1 → abc 0 1 0 1 0 0 1 1 0 1 → abc 1 0 0 1 0 1 0 1 1 0 1 1 0 0 1 → abc 1 1 1 0 1 → abc

f (a, b, c) = abc + abc + abc + abc.

  1. Use De Morgan’s law to build the CNF^2 f (a, b, c) = (a + b + c)·(a + b + c)·(a + b + c)·(a + b + c). (^2) May seems difficult but CNF are useful – and actually simple – when the truth table mainly contains false values...

Blackboard Examples