Digital Logic Design Chapter 2
Digital Logic Design Chapter 2
Binary Systems
DIGITAL SYSTEMS
Digital means electronic technology that generates, stores, and processes data in
terms of two states: positive and non-positive. Positive is expressed or represented
by the number 1 and non positive by the number 0.
Number system
• Numeric systems :The numeric system we use daily is the decimal
system, but this system is not convenient for machines since the
information is handled codified in the shape of on or off bits; this way
of codifying takes us to the necessity of knowing the positional
calculation which will allow us to express a number in any base
where we need it.
• A base of a number system or radix defines the range of values that a
digit may have.
In the binary system or base 2, there can be only two values for each
digit of a number, either a "0" or a "1".
• The Octal Numbering System is a binary number divided up into
groups of only 3 bits, with each group or set of bits having a distinct
value of between 000 (0) and 111 ( 7 ). Octal numbers therefore have
a range of just “8” digits, (0, 1, 2, 3, 4, 5, 6, 7) making them a Base-8
numbering system.
Arbaminch university, AMiT 3
Cont.… Dept. of Electrical and comp Eng.
• The “Hexadecimal” or simply “Hex” numbering system uses the Base of 16 system
and are a popular choice for representing long binary values because their format
is quite compact and much easier to understand compared to the long binary
strings of 1‟s and 0‟s.In the hexadecimal system, we allow 16 values for each digit
of a number: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E",
and "F". Where “A” stands for 10, “B” for 11 and so on.
Cont…
.
• Let's express a decimal number 1341 in binary notation. Note that the desired base
is 2, so we repeatedly divide the given decimal number by 2.
Cont…
• Let's express the same decimal number 1341 in octal notation.
Cont…
The conversion of the fractional part can be obtained by successively multiplying
the fraction with the base. If we iterate this process on the remaining fraction, then
we will obtain successive significant digit. This methods form the basis of the
multiplication methods of converting fractions between bases
Example. Convert the decimal number 3315 to hexadecimal notation. What about
the hexadecimal equivalent of the decimal number 3315.3?
Example-2. Convert the hexadecimal number 4B3 to decimal notation. What about
the decimal equivalent of the hexadecimal number 4B3.3?
• In order to convert a binary number to octal, we partition the base 2 number into
groups of three starting from the radix point, and pad the outermost groups with
0’s as needed to form triples. Then, we convert each triple to the octal equivalent.
For conversion from base 2 to base 16, we use groups of four.
Cont…
• One’s Complement Representation
• The one’s complement operation is trivial to perform: convert all of the 1’s in the
number to 0’s, and all of the 0’s to 1’s. We can observe from the table that in the
one’s complement representation the leftmost bit is 0 for positive numbers and 1 for
negative numbers, as it is for the signed magnitude representation. This negation,
changing 1’s to 0’s and changing 0’s to 1’s, is known as complementing the bits.
• Consider representing (+12)10 and (−12)10 in an eight-bit format, now using the one’s
complement representation:
Cont…
• Consider again representing (+12)10 and (−12)10 in an eight-bit format, this time using
the two’s complement representation. Starting with (+12)10 =(00001100)2,
complement, or negate the number, producing (11110011)2.
• In the coding, when numbers, letters or words are represented by a specific group
of symbols, it is said that the number, letter or word is being encoded. The group of
symbols is called as a code. The digital data is represented, stored and transmitted
as group of binary bits. This group is also called as binary code. The binary code is
represented by the number as well as alphanumeric letter.
• Advantages of Binary Code
• are suitable for the computer applications and digital communications.
• Binary codes make the analysis and designing of digital circuits Since only 0 & 1 are
being used, implementation becomes easy.
Classification of binary codes
The codes are broadly categorized into following four categories.
• Weighted Codes
• Non-Weighted Codes
• Binary Coded Decimal Code
• Alphanumeric Codes
• Error Detecting Codes
• Error Correcting Codes
• Weighted Codes
• Weighted binary codes are those binary codes which obey the positional weight
principle. Each position of the number represents a specific weight. Several systems
of the codes are used to express the decimal digits 0 through 9. In these codes
each decimal digit is represented by a group of four bits.
• Non-Weighted Codes
In this type of binary codes, the positional weights are not assigned. The examples of
non weighted codes are Excess-3 code and Gray code.
Gray Code
• It is the non-weighted code and it is not arithmetic codes. That means there are no
specific weights assigned to the bit position. It has a very special feature that, only
one bit will change each time the decimal number is incremented as shown in fig.
As only one bit changes at a time, the gray code is called as a unit distance code.
The gray code is a cyclic code. Gray code cannot be used for arithmetic operation.
• Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either
true(1) or false (0). It is easier to communicate with computers using formal logic.
• Boolean variable: Takes only two values – either true (1) or false (0). They are used as basic
units of formal logic.
• Boolean algebra: Deals with binary variables and logic operations operating on those variables.
• Logic diagram: Composed of graphic symbols for logic gates. A simple circuit sketch that
represents inputs and outputs of Boolean functions.
The exclusive-or-gate
The exclusive-or-gate is similar to an or-gate. It can have an arbitrary number of inputs, and
its output value is 1 if and only if exactly one input is 1 (and thus the others 0). Otherwise, the
output is 0. We draw an exclusive-or-gate like this:
The exclusive-Nor-gate
The exclusive-Nor-gate is similar to an N or-gate. It can have an arbitrary number of inputs,
and its output value is 1 if and only if the two input are of the same values (1 and 1 or 0 and
0). Otherwise, the output is 0. We draw an exclusive-Nor-gate like this: