You are on page 1of 6

# LOGIKA MATEMATIKA 2004/2005

Boolean Algebra
Developed by George Boole in the 1850s Mathematical

theory of logic.

## Shannon was the first to use Boolean

Aljabar Boolean

Algebra to solve problems in electronic c i r c u i t d e s i g n . ( 1 9 3 8 ) . The behavior of a Digital Circuit can be described in terms of Boolean Algebra. Boolean algebra provides the operations and the rules for working with the set {0, 1}.
2

## Purpose of Boolean Algebra

Boolean Algebra is the Logical idea Mathematical representation

Boolean Constants
In Boolean algebra, there are only two constants, true and false
Boolean constant true false Binary digit 1 0 State of a switch On Off Voltage level +5V 0V
4

tool that allows logical ideas to be represented in a mathematical way, simplified and analyzed, and then translated into real hardware for impl em ent at ion ( u s i n g l o g i c a l g a t e s ) .

Gate - implementation
3

Boolean Variables
Boolean variables are variables that store values that are Boolean c o n s t a n t s .

## Boolean Operator AND

If A and B are Boolean variables (or expressions) then A AND B is true if and only if both A and B are true. If A and B are Boolean variables (or expressions) then A AND B is false if and only if either A or B is false or theyre both false.

## We denote the AND operation like multiplication in ordinary algebra: AB or A.B

5 6

Boolean Operator OR
If A and B are Boolean variables (or expressions) then A OR B is true if and only if at least one of A and B is true. If A and B are Boolean variables (or expressions) then A OR B is false if and only if both A and B are false.

## Boolean Operator NOT

If A is a Boolean variable (or expression) then NOT A has the opposite value from A. We denote the NOT operation by putting a bar over the variable (or expression) : _ A
7 8

A 0 0 1 1

B 0 1 0 1

AB 0 0 0 1

A 0 0 1 1

B 0 1 0 1

A+B 0 1 1 1

10

## Truth Table for NOT

Boolean Operations
The complement is denoted by a bar (on the slides, we

## will use a minus sign). It is defined by

-0 = 1 and -1 = 0.

A 0 1

_ A 1 0

## The Boolean sum, denoted by + or by OR, has the

following values:

1 + 1 = 1,

1 + 0 = 1,

0 + 1 = 1,

0+0=0

## The Boolean product, denoted by or by AND, has the

following values:

1 1 = 1,

1 0 = 0,

0 1 = 0,

00=0
12

11

## The rules of Boolean Algebra are:

AND Operations () 00 = 0 10 = 0 01 = 0 11 = 1 A0 = 0 A1 = A AA = A AA' = 0 Associative Law (AB)C = A(BC) = ABC (A+B)+C = A+(B+C) = A+B+C Distributive Law OR Operations (+) 0+0 = 0 1+0 = 1 0+1 = 1 1+1 = 1 A+0 = A A+1 = 1 A+A = A A+A' = 1 A(B+C) = (AB) + (AC) A+(BC) = (A+B) (A+C) Some Theorems A+(AB) = A A(A+B) = A A(A+B) = AB A+(AB) = A+B A+(AB) = A+B A+(AB) = A+B ABC = (A+B+C) (ABC) = A+B+C

## Boolean Functions and Expressions

Definition: Let B = {0, 1}. The variable x is

Commutative Law AB = B BA A+B = B+A Precedence A B = (A (A)B AB+C = (A (AB) + C A+B A+BC = A + (B (BC) DeMorgan's Theorem (AB)' = A' + B' (NAND) (A+B)' = A' B' (NOR)

## Boolean functions can be represented using

De Morgans theorems

14

13

## Boolean Functions and Expressions

Question: How many different Boolean functions of degree 1 are

## Boolean Functions and Expressions

Question: How many different Boolean functions of degree 2 are

there?

there?

Solution: There are four of them, F1, F2, F3, and F4: x 0 1 F1 0 0 F2 0 1 F3 1 0 F4 1 1

## Solution: There are 16 of them, F1, F2, , F16:

x y F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 F16

0 0 0 1 1 0 1 1

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

15

16

## Evaluating a Boolean Expression

Unlike ordinary algebra, for a BE, there are only finitely many possible assignments of values to the variables; so, theoretically, we can make a table, called a truth table, that shows the value of the BE for every possible set of values of the variables. For convenience, use 0 = false 1 = true

## Filling in a Truth Table

If there are N variables, there are 2N

## possible combinations of values

Thus, there are 2N rows in the truth table Fill in the values by counting up from 0 in

binary

17

18

## Truth Table for (X+Y)Z

X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 (X+Y)Z 0 0 0 1 0 1 0 1
19

Example

## Construct a truth table for

_ E = AB + ___ (A+C)B

20

_ E = AB
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 _ B 1 1 0 0 1 1 0 0 _ AB 0 0 0 0 1 1 0 0

+
A+C 0 1 0 1 1 1 1 1

___ (A+C)B
___ (A+C) 1 0 1 0 0 0 0 0 ___ (A+C)B 0 0 1 0 0 0 0 0 E 0 0 1 0 1 1 0 0
21

## Boolean Functions and Expressions

There is a simple method for deriving a

Boolean expression for a function that is defined by a table. This method is based on minterms. its complement. A minterm of the Boolean variables x1, x2, , xn is a Boolean product y1y2yn, where yi = xi or yi = -xi.
22

## Boolean Functions and Expressions

Example: Give a Boolean expression for the Boolean function

## Boolean Functions and Expressions

Consider F(x,y,z) again:

## F(x, y) as defined by the following table: x 0 0 1 1 y 0 1 0 1

x 0 0 0 0 1 1 1 1
23

y 0 0 1 1 0 0 1 1

z 0 1 0 1 0 1 0 1

F(x, y, z) 1 1 0 0 1 0 0 0

F(x, y) 0 1 0 0

## Possible solution: F(x, y) = (-x).y

24

Logic Gates
Electronic circuits consist of so-called gates. There are three basic

One Implementation
-x x+y

types of gates:

inverter OR gate

x y x y

f B

xy

AND gate
25

f = A B + A B
26

Another Implementation
A

Questions
Draw the logic circuit for AB + CD + ABC = Y

f
A

B C D Y

f = A B + A B = (A + B) A + B

)
27

28

Boolean Algebra

## LOGIC CIRCUIT DESIGN

Truth Table x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 F 0 1 0 0 1 1 1 1

## yang direpresentasikan oleh fungsi F(x,y,z) dan G (x,y,z).

x 1 1 1 1 0 0

y 1 1 0 0 1 1 0 0

z 1 0 1 0 1 0 1 0

F 0 0 1 0 0 0 0 0

G 0 1 0 0 0 1 0 0
30

Boolean Function

F = x + yz

Logic Diagram

x y z

0 0
29

Gambarlah circuit

31

32

## gambarkan circuit yang sesuai.

F ( x, y , z ) = x + y + z F ( x, y , z ) = ( x + z ) y

33