Sie sind auf Seite 1von 6

Boolean algebra

1.1 Goals of Boolean algebra


Boolean algebra has as its aim to use mathematical operations to represent
and
rigorously test logical arguments. A logical statement is a declarative sentence
that is true or false. Logical statements can be combined by using operators
(for
example AND, OR).
Logical conjunction is an operation on two logical values, typically two
propositions that produces a value of true if and only both its operands are
true,
otherwise the value is false. In logic and mathematics, a two-place logical
operator AND is used to form a conjunction.
A disjunction is an operation on logical values that produces true whenever one
or
more of its operands are true (a false value is produced if and only both
operands
are false). A disjunction is known as inclusive disjunction or alternation. Literals
of a statement are separated by OR operator.
Because of the similarities to arithmetic operators, AND operator is known as
logical multiplication or product, while OR operator is known as logical addition
or sum.
A proposition can be an input variable that is assigned to a symbol. Then we
can
express logical statements as functions:
Logical statements combined by using logical operators.
Statement
Logical
expression
Used operator
It is winter y = a BUF
It is winter AND it is snowing y = a & b AND

It is winter OR it is night y = a | b OR
It is winter XOR it is summer y = a ^ b XOR
It is NOT true that it is winter y a = NOT
It is NOT true that: it is winter AND it is
snowing
& y a b = NOT, AND
It is NOT true that: It is winter OR it is
night
y a|b = NOT, OR
It is NOT true that: It is winter XOR it is
summer
^ y a b = NOT, XOR
7
1.2 Rules of Boolean algebra
Basic rules of Boolean algebra performed on a logical argument are
summarized
in the following table:
Basic logical operations.
Symbolic expression Result Comment
y=a&0 y=0
y=a&1 y=a
y=a|0 y=a
y=a|1 y=1
y = a & a y = a The idempotent rule
y = a | a y = a The idempotent rule
& y a a = y = 0 The complementary rule
| y a a = y = 1 The complementary rule
y = a | (a & b) y = a The absorption rule
y = a & (a | b) y = a The absorption rule

The precedence of operations in Boolean algebra are summarized in the


following
table:
Equivalent expression of logical functions by using basic rules in binary logic.
Logical
function
Equivalent
expression
Comment
, w a y w = = y = a The involution rule
y = a & b y = b & a The commulative rule
y = a | b y = b | a The commulative rule
y = (a & b) &
c
y = a & (b
& c)
The associative rule
y = (a | b) | c y = a | (b | c) The associative rule
y=a|b&c
y = a | (b &
c)
Precedence of operators. AND has higher
precedence than OR
8
1.3 Basic operations on logical statements
Basic transformations possible in Boolean algebra in order to simplify logical
functions and expressions are presented in the following table:
Transformations of logical functions by using basic rules in binary logics.
Logical
function

Equivalent
expression
Comment
y = a & (b | c) y = (a & b) |(a & c)
The distributive rule. It can be compared
to arithmetic operations:
6 x (5 + 2) = (6 x 5) + (6 + 2)
y = a | (b & c) y = (a | b) & (a | c)
The distributive rule. It cannot be
compared to arithmetic operations:
6 + (5 x 2) (6 + 5) x (6 + 2)!!
a&b
| ab
De Morgan transformation
a | b & a b De Morgan transformation
& a b | a b De Morgan transformation
|b a & a b De Morgan transformation
The above operations refer to two-value logic (binary). A logical variable can
have two values: zero or one. In general, other possibilities are excluded.
However, some practical applications assume the existence of undefined states
(high impedance can mean
that no values were produced yet), so-called dont know states (we do not
know, if the value assigned is 0
or 1) and dont care states (no matter the value, the operation is identical).
Boolean algebra is a tool suitable for description of operation of digital devices.
A
digital quantity is one that can be represented as being in one of a finite
number of
states, such as 0 and 1, ON and OFF, UP and DOWN). These states are called
quanta.
Many electric devices act as analog, but in real, they are digital with dense
quantization. However, the natural

processes are analog. Digital representation is its approximation.


9
2 Minimization of logical functions
2.1 Binary Coded Decimal
A BCD code (Binary Coded Decimal) is a code, which is a four-position Binary
Coded Decimal. A code word represents a binary value. 2-position BCD
represents the following code words: 00, 01, 10, 11. For a 3-position BCD, they
are: 000, 001, 010, 011, 100, 101, 110, 111.
4-position BCD
It is known as 8421, named after decimal values corresponding to particular
bits
of a 4-bit binary string, starting with the most significant bit at the left hand (2
3,
2 2 , 2 1 , 2 0 = 8, 4, 2, 1). The following code words can be created in a 4position
BCD. In brackets, we present decimal values corresponding to those binary
values:
0000 (0 in decimal)
0001 (1 in decimal)
0010 (2 in decimal )
0011 (3 in decimal)
0100 (4 in decimal)
0101 (5 in decimal)
0110 (6 in decimal)
0111 (7 in decimal )
1000 (8 in decimal )
1001 (9 in decimal)
1010 (10 in decimal )
1011 (11 in decimal)
1100 (12 in decimal)
1101 (13 in decimal )

1110 (14 in decimal )


1111 (15 in decimal)
In general, one can assign any values to particular code words. Since practical
applications require providing an algorithm to convert code words,

Das könnte Ihnen auch gefallen