0% found this document useful (0 votes)
38 views7 pages

112 Note II

The document discusses Binary Coded Decimal (BCD), explaining its conversion process from decimal to binary and vice versa, highlighting its advantages and disadvantages. It also covers Boolean Algebra, detailing its laws and identities, which are essential for analyzing digital logic circuits. Additionally, it introduces DeMorgan's Theorems and provides examples of simplifying Boolean expressions.

Uploaded by

lasisicollins82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views7 pages

112 Note II

The document discusses Binary Coded Decimal (BCD), explaining its conversion process from decimal to binary and vice versa, highlighting its advantages and disadvantages. It also covers Boolean Algebra, detailing its laws and identities, which are essential for analyzing digital logic circuits. Additionally, it introduces DeMorgan's Theorems and provides examples of simplifying Boolean expressions.

Uploaded by

lasisicollins82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

DIGITAL ELECTRONICS NOTES (2)

4. BINARY CODED DECIMAL (BDC)


Binary Coded Decimal, or BCD, is another process for converting decimal numbers into their
binary equivalents

As we naturally live in a decimal (base-10) world we need some way of converting these
decimal numbers into a binary (base-2) environment that computers and digital electronic
devices understand, and binary coded decimal code allows us to do that.

The advantage of the Binary Coded Decimal system is that each decimal digit is represented by
a group of 4 binary digits or bits in much the same way as Hexadecimal. So, for the 10 decimal
digits (0-to-9) we need a 4-bit binary code.

But do not get confused, binary coded decimal is not the same as hexadecimal. Whereas a 4-bit
hexadecimal number is valid up to F16 representing binary 11112, (i.e. decimal 15); binary coded
decimal numbers stop at 9 binary 10012. This means that although 16 numbers (24) can be
represented using four binary digits, in the BCD numbering system the six binary code
combinations of: 1010 (decimal 10), 1011 (decimal 11), 1100 (decimal 12), 1101 (decimal 13),
1110 (decimal 14), and 1111 (decimal 15) are classed as forbidden numbers and cannot be
used.

The main advantage of binary coded decimal is that it allows easy conversion between decimal
(base-10) and binary (base-2) form. However, the disadvantage is that BCD code is wasteful as
the states between 1010 (decimal 10), and 1111 (decimal 15) are not used. Nevertheless,
binary coded decimal has many important applications especially using digital displays.

In the BCD numbering system, a decimal number is separated into four bits for each decimal
digit within the number. Each decimal digit is represented by its weighted binary value
performing a direct translation of the number. So, a 4-bit group represents each displayed
decimal digit from 0000 for a zero to 1001 for a nine.

So, for example, 35710 (Three Hundred and Fifty-Seven) in decimal would be presented in Binary
Coded Decimal as:

35710 = 0011 0101 0111 (BCD)

Then we can see that BCD uses weighted codification, because the binary bit of each 4-bit
group represents a given weight of the final value. In other words, the BCD is a weighted code
and the weights used in binary coded decimal code are 8, 4, 2, 1, commonly called the 8421
code as it forms the 4-bit binary representation of the relevant decimal digit.

Binary Coded Decimal Representation of a Decimal Number


The decimal weight of each decimal digit to the left increases by a factor of 10. In the BCD
number system, the binary weight of each digit increases by a factor of 2 as shown. Then the
first digit has a weight of 1 (20), the second digit has a weight of 2 (21), the third a weight of 4
(22), the fourth a weight of 8 (23).
1
Then the relationship between decimal (denary) numbers and weighted binary coded decimal
digits is given below.

Truth Table for Binary Coded Decimal


Decimal Number BCD 8421 Code
0 0000 0000
1 0000 0001
2 0000 0010
3 0000 0011
4 0000 0100
5 0000 0101
6 0000 0110
7 0000 0111
8 0000 1000
9 0000 1001
10 (1+0) 0001 0000
11 (1+1) 0001 0001
12 (1+2) 0001 0010
… …
20 (2+0) 0010 0000
21 (2+1) 0010 0001
22 (2+2) 0010 0010
etc, continuing upwards in groups of four
Then we can see that 8421 BCD code is nothing more than the weights of each binary digit,
with each decimal (denary) number expressed as its four-bit pure binary equivalent.

DECIMAL-TO-BCD CONVERSION
As we have seen above, the conversion of decimal to binary coded decimal is very similar to the
conversion of hexadecimal to binary. Firstly, separate the decimal number into its weighted
digits and then write down the equivalent 4-bit 8421 BCD code representing each decimal digit
as shown.

Example No1: Using the above table, convert the following decimal (denary) numbers: 85 10,
57210 and 857910 into their 8421 BCD equivalents.

2
8510 = 1000 0101 (BCD)

57210 = 0101 0111 0010 (BCD)

857910 = 1000 0101 0111 1001 (BCD)

Note that the resulting binary number after the conversion will be a true binary translation of
decimal digits. This is because the binary code translates as a true binary count.

BCD-TO-DECIMAL CONVERSION
The conversion from binary coded decimal to decimal is the exact opposite of the above. Simply
divide the binary number into groups of four digits, starting with the least significant digit and
then write the decimal digit represented by each 4-bit group. Add additional zero’s at the end if
required to produce a complete 4-bit grouping. So for example, 110101 2 would become: 0011
01012 or 3510 in decimal.

Example No2: Convert the following binary numbers: 10012, 10102, 10001112 and
10100111000.1012 into their decimal equivalents.
10012 = 1001BCD = 910

10102 = this will produce an error as it is decimal 1010 and not a valid BCD number

10001112 = 0100 0111BCD = 4710

10100111000.1012 = 0101 0011 0001.1010BCD = 538.62510

The conversion of BCD-to-decimal or decimal-to-BCD is a relatively straight forward task but we


need to remember that BCD numbers are decimal numbers and not binary numbers, even
though they are represented using bits. The BCD representation of a decimal number is
important to understand, because microprocessor-based systems used by most people needs
to be in the decimal system.

However, while BCD is easy to code and decode, it is not an efficient way to store numbers. In
the standard 8421 BCD encoding of decimal numbers, the number of individual data bits
needed to represent a given decimal number will always be greater than the number of bits
required for an equivalent binary encoding.

For example, in binary a three-digit decimal number from 0-to-999 requires only 10-bits
(11111001112), whereas in binary coded decimal, the same number requires a minimum of 12-
bits (0011 1110 0111BCD) for the same representation.

Also, performing arithmetic tasks using binary coded decimal numbers can be a bit awkward
since each digit cannot exceed 9. The addition of two decimal digits in BCD, will create a
possible carry bit of 1 which needs to be added to the next group of 4-bits.

The main advantage of the Binary Coded Decimal system is that it is a fast and efficient system
to convert the decimal numbers into binary numbers as compared to the pure binary system.
3
But the BCD code is wasteful as many of the 4-bit states (10-to-16) are not used but decimal
displays have important applications.

4
BOOLEAN ALGEBRA
Boolean Algebra is an algebra, which deals with binary numbers & binary variables. Hence, it is also
called as Binary Algebra or logical Algebra. Boolean Algebra uses a set of Laws and Rules to define the
operation of a digital logic circuit. As well as the logic symbols “0” and “1” being used to represent a
digital input or output, we can also use them as constants for a permanently “Open” or “Closed” circuit
or contact respectively.

Boolean Algebra is the mathematics we use to analyse digital gates and circuits. We can use these “Laws
of Boolean Algebra” to both reduce and simplify a complex Boolean expression in an attempt to reduce
the number of logic gates required. Boolean Algebra is therefore a system of mathematics based on
logic that has its own set of rules or laws which are used to define and reduce Boolean expressions.

The variables used in Boolean Algebra only have one of two possible values, a logic “0” and a logic “1”
but an expression can have an infinite number of variables all labelled individually to represent inputs to
the expression, For example, variables A, B, C etc., can be related by the logical expression of A + B = C,
where each variable can ONLY be a 0 or a 1.

Each of the Boolean Laws described are given with just a single or two variables, but the number of
variables defined by a single law is not limited to this as there can be an infinite number of variables as
inputs to the expression. These Boolean laws that will be detailed can be used to prove any given
Boolean expression as well as for simplifying complicated digital circuits.

LAWS OF BOOLEAN ALGEBRA


Following are the three basic laws of Boolean Algebra.

1. Commutative Law

If any logical operation of two Boolean variables give the same result irrespective of the order of those
two variables, then that logical operation is said to be Commutative. The logical OR & logical AND
operations of two Boolean variables A & B are shown below

(a) OR: A+B=B+A

(b) AND: AB=BA

The symbol ‘+’ indicates logical OR operation. Similarly, the symbol ‘.’ indicates logical AND operation
and it is optional to represent.

2. Associative Law

If a logical operation of any two Boolean variables is performed first and then the same operation is
performed with the remaining variable gives the same result, then that logical operation is said to be
Associative. The logical OR & logical AND operations of three Boolean variables A, B & C are shown
below.

(a) OR: (A + B) + C = A + (B + C)

(b) AND: (A B) C = A (B C)

3. Distributive Law

If any logical operation can be distributed to all the terms present in the Boolean function, then that
logical operation is said to be Distributive. The distribution of logical OR & logical AND operations of
three Boolean variables A, B & C are shown below.
5
(a) A (B + C) = A B + A C

(b) A + (B C) = (A + B) (A + C)

OTHER BOOLEAN IDENTITIES INCLUDE:

Redundance Law – This law enables a reduction in a complicated expression to a simpler one by
absorbing like terms.

A + (A.B) = A (OR Redundance Law)

A (A + B) = A (AND Redundance Law)

Annulment Law – A term AND´ed with a “0” equals 0 or OR´ed with a “1” will equal 1

A . 0 = 0 A variable AND’ed with 0 is always equal to 0

A + 1 = 1 A variable OR’ed with 1 is always equal to 1

Identity Law – A term OR´ed with a “0” or AND´ed with a “1” will always equal that term

A + 0 = A A variable OR’ed with 0 is always equal to the variable

A . 1 = A A variable AND’ed with 1 is always equal to the variable

Idempotent Law – An input that is AND´ed or OR´ed with itself is equal to that input

A + A = A A variable OR’ed with itself is always equal to the variable

A . A = A A variable AND’ed with itself is always equal to the variable

Complement Law – A term AND´ed with its complement equals “0” and a term OR´ed with its
complement equals “1”

A . A¯ = 0 A variable AND’ed with its complement is always equal to 0

A + A¯ = 1 A variable OR’ed with its complement is always equal to 1

Double Negation Law – A term that is inverted twice is equal to the original term

A double complement of a variable is always equal to the variable

DeMORGAN’S THEOREM
This theorem is useful in finding the complement of Boolean function. It is actually two theorems in
one.

DeMorgan’s First Theorem


DeMorgan’s First theorem proves that when two (or more) input variables are AND’ed and negated,
they are equivalent to the OR of the complements of the individual variables. Thus the equivalent of the
NAND function and is a negative-OR function proving that

6
DeMorgan’s Second Theorem
DeMorgan’s Second theorem proves that when two (or more) input variables are OR’ed and negated,
they are equivalent to the AND of the complements of the individual variables. Thus the equivalent of
the NOR function and is a negative-AND function proving that

SIMPLIFICATION OF BOOLEAN EXPRESSIONS

Example 1:

Example 2:

Example 3:

Example 4: Simplify the expression AB + A( B + C ) + B ( B + C )?

= AB+AB +AC+BB+BC
According to the idempotent law (AB+AB) = AB, and B.B = B, thus the equation
= (AB)+AC+(B+BC)
The last expression can be rewritten as
= AB+AC+B(1+C), and according to the annulment law, 1+C = 1, therefore
=AB+AC+B
= (AB+B) +AC = B (A + 1) + AC
=B+AC (also annulment law).

You might also like