SEM 3
SEM 3
Introduction:
Digital electronics is the foundation of modern computers and Digital
Communications. Massively complex digital logic circuits with the millions of
gates can now be built on to a single integrated circuits such as microprocessor and
the circuits can perform millions of operations per second.
Digital techniques are used Deck of its earlier to get an electronic devices to
switch into one of the number of known States then to accurately reproduce a
continuous range of values.
An advantage of digital circuits when compared to unlock software is that if
signal the presented digitally can be transmitted without the degradation due to
noise.
information storage can be easier in digital systems than in aalog ones. the
voice immunity of digital systems format data to be stored and retrieved without
degradation in a digital system as long as the total noise is below is a time level the
information can be recovered perfectly.
digital electronic circuits are usually made from large assemblies of logic
gates simple electronic representations of Boolean logic functions.
number is representation of a quantity by using certain symbols A quantity
of things is expressed instead of writing in words a value may be mentioned by
writing some symbols this symbol representation is must to perform various
mathematical operations addition subtraction multiplication and division this is
symbolic representation of numerical values developed many number of system.
there are mainly two types of numbering system
1. non positional numbering system
2. positional numbering system
1. non positional numbering system:
positional number system is ancient Roman number system
in this Roman system letters of converted into numerical digits as shown below
I=1; V = 5; X = 10; L = 50; C = 100; D = 50; M = 1000
Did not follow the arrangement of digits in position to express a numerical value as
in our Arabic system that is decimal system
2. positional number system
the most widely used in number system is positional number system.
in this number system the position of a digit indicates the significance to be
attached to that digit.
there are many positional number system are in practice. its term deposit one by
the other in numbers of digits available in the system.
the commonly used position number systems are
1. decimal number system
2. binary number system
3. octal number system
4. hexadecimal number system
Base or Radix:
the number of symbols that can be used in a number system is known as a base or
radix of a system
it is always one more than the highest digit of the system
1. binary number system
the number system with the base or radix 2 is known as in binary number
system
binary means two.
first in binary number system the two symbols available are 0 and 1.
The symbol 0 or 1 Is called Abbott instead of calling a binary digit.
Examples 1011, 1010, 1000 , 11110000 etc.
The Binary System is also a positional value system that in each bite it is it
has its own value or wait Express it as a power of 2.
For binary numbers that bind it is it at the extreme right is referred as and
least significant bit LSB.
in the Binder number 1001, the 1 at the right is the LSB. the left most
binary digit is called the most significant bit MSB.
the special terms used with the binary number system or explained as
follows:
1. Bit: it is an abbreviation for by and it is it it is 0 or 1
2. Nibble: it is a group of 4 bits.
3. Bite: it is a group of 8 bits.
4. computer word: it is a set of fixed number of bits wearing from 8 to
64 bits the length of computer word usually called word size or word
length
2. Octal number system
the number system with base or radix 8 is known as an octal number system
In this system 8 symbols 0, 1, 2, 3, 4, 5, 6 and 7are used to represent the
numbers Thus any octal numbers in a combination of 3 digits
Since its base 8 = 2 power 3, Repeat group of binary can be represented by
an octal digit. An octal number is ⅓ of the length of the corresponding
binary number
similar to decimal and binary number system it is also a positional number
system
3. hexadecimal number system
the number system with base or radix 16 is known as hexadecimal number
system
Number system having 16 distinct the symbols to represent the numbers
these are numericals 0 to 9 and alphabets A to F. thus any hexadecimal
number is a combination of these digits.
examples 2009, 924, 8080, 962F etc
as numbers and alphabets are used to represent the digital in hexadecimal
number system hence it is also known as Alphanumerical number system
hexadecimal number system is very popular in computer uses and more
show in microprocessor work.
4. Decimal Number system:
Decimal means 10
The number system with base or radix 10 is known as decimal number
system
Number system contains 10 different symbols. These are 0, 1, 2, 3, 4, 5, 6,
7, 8 and 9
Any decimal number is given as a combination of only ten digits.
Example: 19, 108, 2014, 143.79 etc.
Comparison of different number system
Convert a given decimal number into binary, octal and hexadecimal numbers
and vice versa.
1. Decimal to binary conversion:
The given decimal number consists of both integer and fractional parts, then each
part should be converted to its equivalent binary separately.
Case - 1 : Decimal integer part:
To convert a decimal integer part to binary number, the decimal number is
successively divided by 2 and the remainders are recorded after each division until
quotient is zero.
Let us consider a decimal number say, 13.
Dividing the given decimal number 13, we get the quotient 6 and remainder 1.
The 6 is then divided by 2, giving a quotient 3 and remainder 0.
This process is carryout until the quotient becomes zero.
Note that the first remainder is the LSB and last remainder is the MSB.
The binary equivalent of the decimal number 13 = 1101
Case - 2: Decimal Fractional Part:
Let us consider a decimal fractional part 0.875
Multiplying it by 2, we get the result 1.750.
Only fractional part of the result should be multiplied by 2 to get the next binary
bit (0.75 x 2 = 1.5).
This process is carryout until we get zero.
0.875 x 2 = 1.750 with a carry of 1
0.75 x 2 = 1.50 with a carry of 1
0.5 x 2 = 1.0 with a carry of 1
Reading carries downward we get binary fraction 0.111 which is equivalent to
0.875 decimal.
NOTE: In certain cases we may not get a value of 0 after repeated multiplication
by 2. Then we shall try to end the process after a specified number of binary
places.
Eg: 2. Convert 26.10 into binary number.
Step 1: to find equivalent binary number for integer part
Covert Decimal to Binary for whole numbers
∴ 26.1510=11010.001001100112
1510=001001100112
∴ 467.4310=723.334128
4310=334128
∴ 22.6410=16.A3D7016
6410=A3D7016
101010.10112=42.687510
octal to decimal conversion:
Any octal no. can be converted into its equivalent decimal no. in the same manner
as the binary to decimal conversion.
The only difference is that power of 8 is used in place of 2.
Eg: 1. Convert 143.258 to its decimal equivalent.
143.258=(1×82)+(4×81)+(3×80)+(2×8−1)+(5×8−2)
143.258=64+32+3+0.25+0.078125
143.258=99+0.328125
143.258=99.32812510
Hexadecimal to decimal conversion:
Any hexadecimal no. can be converted into its equivalent decimal no. in the same
manner as the binary / octal to decimal conversion.
The only difference is that power of 16 is used instead of 2/8.
Eg: 1. Convert BED.15 to its decimal equivalent.
BED.1516=(B×162)+(E×161)+(D×160)+(1×16−1)+(5×16−2)
BED.1516=0+0+0+0.0625+0.01953125
BED.1516=0+0.08203125
BED.1516=0.0820312510
Binary to octal conversion:
Binary numbers can be converted into equivalent octal numbers by making groups
of 3-bits.
The group should be considered from the binary point towards the LSB and MSB
separately.
Eg: 1. Convert 11101.01012 to octal equivalent.
Split the binary number from left to right each group 3 bits
011 101 . 010 100
3 5 . 2 4
11101.01012=35.248
Binary to hexadecimal conversion:
Binary numbers can be converted into equivalent hexadecimal numbers by making
groups of 4-bits.
The group should be considered from the binary point towards the LSB and MSB
seperately.
Eg: 1. Convert 0.0101012into hexadecimal number.
Split the binary number from left to right each group 4 bits
0000 . 0101 0100
0 . 5 4
0.0101012=0.5416
Octal to binary conversion:
Octal number can be converted into equivalent binary numbers by replacing each
octal digit by its3-bit equivalent binary.
Eg: 1. Convert octal number 630.158to binary.
Write equivalent binary for given octal value
6 3 0 . 1 5
110 011 000 . 001 101
630.158=110011000.0011012
Hexadecimal to binary conversion:
Hexadecimal numbers can be converted into equivalent binary numbers by
replacing each hexadecimal digit by its 4-bit equivalent binary.
Eg: convert hexadecimal number 0.BF3 into binary number.
Write equivalent binary for given hexa decimal value
0 . B F 3
0000 . 1011 1111 0011
0.BF316=0000.1011111100112
Octal to hexadecimal conversion:
Convert Octal Number into Binary Number
Convert Binary Number into Hex Number
Eg: convert 615 to its hexadecimal equivalent.
Convert Octal Number into Binary Number
6 1 5
110 001 101
6158=1100011012
1100011012=18D16
Hexadecimal top octal conversion:
Convert hexadecimal Number into Binary Number
Convert Binary Number into octal Number
Eg: convert 25B16 to its octal conversion
Convert Hexa Decimal number to binary
2 5 B
0010 0101 1011
25B16=0010010110112
0010010110112=11338
Binary Arithmetic:
Binary arithmetic is essential part of all the digital computers and many other digital
system.
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary
addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the
given column and a carry of 1 over to the next column.
Example − Addition
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary
subtraction. There are four rules of binary subtraction.
Example − Subtraction
Binary Multiplication
Binary multiplication is similar to decimal multiplication. It is simpler than decimal
multiplication because only 0s and 1s are involved. There are four rules of binary
multiplication.
Example − Multiplication
Binary Division
Binary division is similar to decimal division. It is called as the long division procedure.
Example − Division
Complement Arithmetic
Complements are used in the digital computers in order to simplify the subtraction
operation and for the logical manipulations. For each radix-r system (radix r represents
base of number system) there are two types of complements.
2 Diminished Radix Complement The diminished radix complement is referred to as the (r-1)'s
complement
2's complement
The 2's complement of binary number is obtained by adding 1 to the Least Significant
Bit (LSB) of 1's complement of the number.
2's complement = 1's complement + 1
Example of 2's Complement is as follows.
9’s complement and 10’s complement are used to make the arithmetic operations in
digital system easier. These are used to make computational operations easier using
complement implementation and usually trade hardware usage to the program.
To obtain the 9’s complement of any number we have to subtract the number with (10 n –
1) where n = number of digits in the number, or in a simpler manner we have to subtract
each digit of the given decimal number from 9.
10’s complement, it is relatively easy to find out the 10’s complement after finding out
the 9’s complement of that number. We have to add 1 with the 9’s complement of any
number to obtain the desired 10’s complement of that number. Or if we want to find out
the 10’s complement directly, we can do it by following the following formula, (10 n –
number), where n = number of digits in the number.
Let us take a decimal number 456, 9’s complement of this number will be
999
-456
_____
543
543
(+)1
______
544
Binary Codes
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.
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.
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)2 or (3)10 to each code word in 8421. The excess-3 codes
are obtained as follows −
Example
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.
Alphanumeric codes
A binary digit or bit can represent only two symbols as it has only two states '0' or '1'.
But this is not enough for communication between two computers because there we
need many more symbols for communication. These symbols are required to represent
26 alphabets with capital and small letters, numbers from 0 to 9, punctuation marks
and other symbols.
The alphanumeric codes are the codes that represent numbers and alphabetic
characters. Mostly such codes also represent other characters such as symbol and
various instructions necessary for conveying information. An alphanumeric code should
at least represent 10 digits and 26 letters of alphabet i.e. total 36 items. The following
three alphanumeric codes are very commonly used for the data representation.
Error Codes
There are binary code techniques available to detect and correct data during data
transmission.
Error-Detecting codes
Whenever a message is transmitted, it may get scrambled by noise or data may get
corrupted. To avoid this, we use error-detecting codes which are additional data added
to a given digital message to help us detect if an error occurred during transmission of
the message. A simple example of error-detecting code is parity check.
Error-Correcting codes
Along with error-detecting code, we can also pass some data to figure out the original
message from the corrupt message that we received. This type of code is called an
error-correcting code. Error-correcting codes also deploy the same strategy as error-
detecting codes but additionally, such codes also detect the exact location of the
corrupt bit.
In error-correcting codes, parity check has a simple way to detect errors along with a
sophisticated mechanism to determine the corrupt bit location. Once the corrupt bit is
located, its value is reverted (from 0 to 1 or 1 to 0) to get the original message.
Even parity -- Even parity means the number of 1's in the given word including the
parity bit should be even (2,4,6,....).
Odd parity -- Odd parity means the number of 1's in the given word including the parity
bit should be odd (1,3,5,....).