Computer System - Boolean Functions
Using boolean values and operators, you can create a boolean function.
The Truth Table of Boolean Functions
A boolean is simple; it can only be 0 or 1. Boolean functions have a fixed number of rows in a truth table based on this.
f(x, y) = (x + y)´ . y
x | y | (x+y)´.y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
f(x, y, z) = (x + z) . (y + z)
x | z | y | (x+z).(y+z) |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
Boolean Function Synthesis
The boolean function synthesis is the process of creating a Boolean function that performs a desired logic operation.
You have two ways to synthesize a boolean function:
- The 1's (Minterms) - For each row where the result is 1, write a Boolean expression that matches only that row. Then, combine these expressions using the OR operator.
- The 0's (Maxterms) - For each row where the result is 0, write a Boolean expression that matches only that row. Then, combine these expressions using the AND operator.
Example
x | y | z | unknown |
---|---|---|---|
0 | 0 | 0 | 1 <- x´ . y´ . z´ |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 1 <- x´ . y . z´ |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 0 |
f(x, y, z) = (x´ . y´ . z´) + (x´ . y . z´)
Simplifying
Typically, the result of synthesizing a Boolean function is a complex expression that needs to be simplified.
1. Start
(x´ . y´ . z´) + (x´ . y . z´)
2. Apply Distributive Law: (x . y) + (x . z) = x . (y + z)
x´ . z´ . (y´ + y)
3. Apply Complement Law: x´ + x = 1
x´ . z´ . 1
4. Result:
x´ . z´