0% found this document useful (0 votes)
250 views24 pages

Digital Logic Design Chapter 2

Digital systems represent data using two states: 1 and 0. A digital system uses discrete high and low states known as bits to represent information, while analog systems use continuous values. Although digital representations are discrete, the information can be either discrete like numbers and letters, or continuous like sounds and images. Binary is a numbering system that uses only two values, 0 and 1, to represent each digit. Different number bases like octal and hexadecimal are used to more compactly represent long binary values. Number conversion between bases uses the place value of each digit. Signed binary numbers represent positive and negative values using the most significant bit as the sign bit.

Uploaded by

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

Digital Logic Design Chapter 2

Digital systems represent data using two states: 1 and 0. A digital system uses discrete high and low states known as bits to represent information, while analog systems use continuous values. Although digital representations are discrete, the information can be either discrete like numbers and letters, or continuous like sounds and images. Binary is a numbering system that uses only two values, 0 and 1, to represent each digit. Different number bases like octal and hexadecimal are used to more compactly represent long binary values. Number conversion between bases uses the place value of each digit. Signed binary numbers represent positive and negative values using the most significant bit as the sign bit.

Uploaded by

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

Dept. of Electrical and comp Eng.

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.

A „digital system‟ is a data technology that uses discrete (discontinuous) values


represented by high and low states known as bits.
By contrast, non-digital (or analog) systems use a continuous range of values to
represent information.
Although digital representations are discrete, the information represented can be
either discrete, such as numbers, letters or icons, or continuous, such as sounds,
images, and other measurements of continuous systems.

Arbaminch university, AMiT 1


Cont.… Dept. of Electrical and comp Eng.

 A „digital system‟ is a data technology that uses discrete (discontinuous) values


represented by high and low states known as bits. By contrast, non-digital (or
analog) systems use a continuous range of values to represent information.
Although digital representations are discrete, the information represented can be
either discrete, such as numbers, letters or icons, or continuous, such as sounds,
images, and other measurements of continuous systems.
1.2 Binary digital logic level and digital waveform
• Binary describes a numbering scheme in which there are only two possible values
for each digit: 0 and 1. The term also refers to any digital encoding/decoding
system in which there are exactly two possible states. In digital data memory,
storage, processing, and communications, the 0 and 1 values are sometimes called
"low" and "high," respectively.

Figure-1 Digital waveform

Arbaminch university, AMiT 2


Dept. of Electrical and comp Eng.

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.

Arbaminch university, AMiT 4


Dept. of Electrical and comp Eng.
Number Base Conversion
- Convert from Decimal to Any Base
• There are many methods or techniques which can be used to convert code from
one format to another. We'll demonstrate here the following:
As an example, let's start with a decimal number 1234 and convert it to decimal
notation (base 10)

Arbaminch university, AMiT 5


Dept. of Electrical and comp Eng.

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.

Arbaminch university, AMiT 6


Dept. of Electrical and comp Eng.

Cont…
• Let's express the same decimal number 1341 in octal notation.

• Let's express the same decimal number 1341 in hexadecimal notation.

Arbaminch university, AMiT 7


Dept. of Electrical and comp Eng.

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?

Arbaminch university, AMiT 8


Cont… Dept. of Electrical and comp Eng.

Convert From Any Base to Decimal


Example-1. Convert 234.14 expressed in an octal notation to decimal.

Example-2. Convert the hexadecimal number 4B3 to decimal notation. What about
the decimal equivalent of the hexadecimal number 4B3.3?

Arbaminch university, AMiT 9


Cont… Dept. of Electrical and comp Eng.

• Example. Convert 234.14 expressed in an octal notation to decimal

• 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.

Arbaminch university, AMiT 10


Cont… Dept. of Electrical and comp Eng.

• SIGNED BINARY NUMBERS


• In mathematics, positive numbers (including zero) are represented as unsigned
numbers. That is we do not put the +ve sign in front of them to show that they are
positive numbers. However, when dealing with negative numbers we do use a -ve
sign in front of the number to show that the number is negative in value and
different from a positive unsigned value, and the same is true with signed binary
numbers. However, in digital circuits there is no provision made to put a plus or
even a minus sign to a number, since digital systems operate with binary numbers
that are represented in terms of “0‟s” and “1‟s”.
• So to represent a positive (N) and a negative (-N) binary number we can use the
binary numbers with sign. For signed binary numbers the most significant bit (MSB)
is used as the sign.If the sign bit is “0”, this means the number is positive. If the sign
bit is “1”, then the number is negative. The remaining bits are used to represent
the magnitude of the binary number in the usual unsigned binary number format.

Arbaminch university, AMiT 11


Dept. of Electrical and comp Eng.

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:

• Two’s Complement Representation


The two’s complement is formed in a way similar to forming the one’s
complement: complement all of the bits in the number, but then add 1, and if
that addition results in a carry-out from the most significant bit of the number,
discard the carry-out.

Arbaminch university, AMiT 12


Dept. of Electrical and comp Eng.

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.

Arbaminch university, AMiT 13


Binary Codes
Dept. of Electrical and comp Eng.

• 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

Arbaminch university, AMiT 14


Cont…
Dept. of Electrical and comp Eng.

• 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.

Arbaminch university, AMiT 15


Dept. of Electrical and comp Eng.
Cont…
• Excess-3 code
The Excess-3 code is also called as XS-3 code. It is non-weighted code used to
express decimal numbers. The Excess-3 code words are derived from the 8421 BCD
code words adding (0011)2or (3)10 to each code word in 8421. The excess-3 codes
are obtained as follows

Arbaminch university, AMiT 16


Cont…
Dept. of Electrical and comp Eng.

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.

Arbaminch university, AMiT 17


cont…
Dept. of Electrical and comp Eng.

Binary Coded Decimal (BCD) code


• In this code each decimal digit is represented by a 4-bit binary number. BCD is a
way to express each of the decimal digits with a binary code. In the BCD, with four
bits we can represent sixteen numbers (0000 to 1111). But in BCD code only first
ten of these are used (0000 to 1001). The remaining six code combinations i.e.
1010 to 1111 are invalid in BCD.

Advantages of BCD Codes


• It is very similar to decimal system.
• We need to remember binary equivalent of decimal numbers 0 to 9 only.
• Disadvantages of BCD Codes
• The addition and subtraction of BCD have different rules.
• The BCD arithmetic is little more complicated.
• BCD needs more number of bits than binary to represent the decimal number. So
BCDuniversity,
Arbaminch is less AMiT
efficient than binary. 18
Dept. of Electrical and comp Eng.
cont…
Example − convert (11101)2 to BCD.

Arbaminch university, AMiT 19


.
Dept. of Electrical and comp Eng.

Arbaminch university, AMiT 20


LOGIC GATES
Dept. of Electrical and comp Eng.

• 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.

Arbaminch university, AMiT 21


Dept. of Electrical and comp Eng.
Cont…
 The NAND-gate

Arbaminch university, AMiT 22


Cont…
Dept. of Electrical and comp Eng.

 The NOR -gate

Arbaminch university, AMiT 23


Cont…
Dept. of Electrical and comp Eng.

 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:

Arbaminch university, AMiT 24

You might also like