A characteristic of digital systems is their ability to represent and manipulate discrete elements of information. Any set that is restricted to a finite number of elements contains discrete information.
Examples of discrete sets are the 10 decimal digits. the 26 letters of the alphabet the 52 playing cards. Early digital computers were used for numeric computations. In this case. the discrete elements were the digits. From this application the term digital computer emerged.
Discrete elements of information are represented in a digital system by physical quantities called signals.
Electrical signals such as voltages and currents arc the most common . Electronic devices called transistors predominate in the circuitry that implements these signals. The signals in most present day electronic digital systems use just two discrete values and are the therefore said to be binary.
A binary digit is called a bit. It has two values: 0 and I. Discrete elements of information are represented with groups of bits called binary codes.
A major trend in digital design methodology is the use of a hardware description language(HDL) to describe and simulate the functionality of a digital circuit.
An HDL resembles a programming language and is suitable for describing digital circuits in textual form. It is used to simulate a digital system to verify its operation before hardware is built in. It is also used in conjunction with logic synthesis tools to automate the design process.
Digital circuits are also referred to as logic circuits. They process data by means of binary logic elements (logic gates) using binary signals. Quantities are stored in binary (two valued) storage elements (flipflops).
A decimal number is reresented by the convention.
\( a_5a_4a_3a_2a_1a_0.a_{1}a_{2}a_{3} \)
The coefficients a_{j} are any digits (0  9) and the subscript value 'j' gives the place value and hence the power of 10 by which the coefficient must he multiplied. Thus, the preceding decimal number can he expressed as
\( 10^5a_5 + 10^4a_4 + 10^3a_3 + 10^2a_2 + 10^1a_1 + 10^0a_0 + 10^{1}a_{1} + 10^{2}a_{2} + 10^{3}a_{3} \)
The decimal number system is said be of base, or radix = 10 because it uses 10 digits and the coefficients are multiplied by powers of 10.
The binary system is a different number system. The coefficients of the binary number system have only two [possible values: 0 and 1].
Each coefficient a_{j} is multiplied by 2^{j} and the results are added to obtain the decimal equivalent of the number. The radix point ( e.g .. the decimal point when 10 is the radix) distinguishes positive powers of 10 from negative powers of 10.
Example: Binary number 11010.11 in decimal form is expressed as:
\( 1 * 2^4 + 1 * 2^3 + 0 * 2^2 + 1 * 2^1 + 0 * 2^0 + 1 * 2^{1} + 1 * 2^{2} = 26.75\)
In general a number of base 'r' is expressed as:
\( r^na_n + r^{n1}a_{n1} + r^{n2}a_{n2} + r^{n3}a_{n3} + ... + r^{1}a_{1} + r^{0}a_{0} + r^{1}a_{1} + r^{2}a_{2} + ... + r^{m}a_{m} \)
The coefficients a_{j} range in value from 0 to r  1.
Example: Base5 number (4021.2)_{5} in decimal form is expressed as:
\( 4 * 5^3 + 0 * 5^2 + 2 * 5^1 + 1 * 5^0 + 2 * 5^{1} = (511.40)_{10} \)
Example: Octal number (127.4)_{8} in binary form is expressed as:
\( 1 * 8^2 + 2 * 8^1 + 7 * 8^0 + 4 * 8^{1} = (87.5)_{10}\)
Example: Hexadecimal number (B65F)_{16} in binary form is expressed as:
\( 11 * 16^3 + 6 * 16^2 + 5 * 16^1 + 15 * 16^0 = (46687)_{10}\)
For example,
00011010 + 00001100 = 00100110  1 1  carries  
0 0 0 1 1 0 1 0  =  26_{(base 10)}  
+ 0 0 0 0 1 1 0 0 
=  12_{(base 10)}  
0 0 1 0 0 1 1 0  =  38_{(base 10)}  


00010011 + 00111110 = 01010001  1 1 1 1 1  carries  
0 0 0 1 0 0 1 1  =  19_{(base 10)}  
+ 0 0 1 1 1 1 1 0 
=  62_{(base 10)}  
0 1 0 1 0 0 0 1  =  81_{(base 10)} 
Note: The rules of binary addition (without carries) are the same as the truths of the XOR gate.
For example,
00100101  00010001 = 00010100  0  borrows  
0 0 
=  37_{(base 10)}  
 0 0 0 ^{ }1 0 0 0 1 
=  17_{(base 10)}  
0 0 0 ^{ }1 0 1 0 0  =  20_{(base 10)}  


00110011  00010110 = 00011101  0 ^{1}0 1  borrows  
0 0 
=  51_{(base 10)}  
 0 0 0 ^{ }1 0 ^{ }1 1 0 
=  22_{(base 10)}  
0 0 0 ^{ }1 1 ^{ }1 0 1  =  29_{(base 10)} 
For example,
00101001 × 00000110 = 11110110  0 0 1 0 1 0 0 1  =  41_{(base 10)}  
× 0 0 0 0 0 1 1 0 
=  6_{(base 10)}  
0 0 0 0 0 0 0 0  
0 0 1 0 1 0 0 1  
0 0 1 0 1 0 0 1 

0 0 1 1 1 1 0 1 1 0  =  246_{(base 10)}  


00010111 × 00000011 = 01000101  0 0 0 1 0 1 1 1  =  23_{(base 10)}  
× 0 0 0 0 0 0 1 1 
=  3_{(base 10)}  
1 1 1 1 1  carries  
0 0 0 1 0 1 1 1  
0 0 0 1 0 1 1 1 

0 0 1 0 0 0 1 0 1  =  69_{(base 10)} 
Binary division is the repeated process of subtraction, just as in decimal division.
For example,
00101010 ÷ 00000110 = 00000111  1  1  1  =  7_{(base 10)}  
1 1 0  )  0  0   ^{1}0  1  0  1  0  =  42_{(base 10)}  
  1  1  0  =  6_{(base 10)}  
1  borrows  
 ^{1}0  1  
  1  1  0  
1  1  0  
  1  1  0  
0  


10000111 ÷ 00000101 = 00011011  1  1  0  1  1  =  27_{(base 10)}  
1 0 1  )     ^{1}0  0  1  1  1  =  135_{(base 10)}  
  1  0  1  =  5_{(base 10)}  
1   ^{1}0  
  1  0  1  
1  1  
  0  
1  1  1  
  1  0  1  
1  0  1  
  1  0  1  
0 
The conversion of a decimal integer to a number in base 'r' is done by dividing the number and all successive quotients by 'r' and accumulating the remainders.
Integer  Quotient  Remainder  Coefficient 'a_{j}' 

153 / 8 =  19  1  a_{0} = 1 
19 / 8 =  2  3  a_{1} = 3 
2/8 =  0  2  a_{2} = 2 
Therefore, the answer of (153)_{10} = \( a_2a_1a_0 \) = (231) _{8}.
Q.Convert decimal (0.6875)_{10} to binary.
Step  Integer  Fraction  Coefficient 'a_{j}' 

0.6875 * 2=  1  0.375  a_{1} = 1 
0.3750 * 2 =  0  0.75  a_{2} = 0 
0.75 * 2 =  1  0.5  a_{3} = 1 
0.5 * 2 =  1  0  a_{4} = 1 
Therefore, the answer of (0.6875)_{10} = \( (0.a_{1}a_{2}a_{3}a_{ 4})_2 \) = \( (0.1011)_2 \). To convert a decimal fraction to a number expressed in base 'r', a similar procedure is used. However. multiplication is by 'r' instead of 2 and the coefficients found from the Integers may range in value from 0 to r  1 instead of 0 and 1.
Q.Convert decimal (0.513)_{10} to octal.
The conversion from and to binary, octal and hexadecimal plays an important role in digital computers. Since 2^{3} = 8 and 2^{4}= 16, each octal digit corresponds to three binary digits and each hexadecimal digit corresponds to four binary digits.
The conversion from binary to octal is easily accomplished by partitioning the binary number into groups of three digits each starting from the binary point ( . ) and proceeding to the left and to the right. The corresponding octal digit is then assigned to each group.
Conversion from binary to hexadecimal is similar, except that the binary number is divided into groups of four digits: The corresponding hexadecimal (or octal) digit for each group of binary digils is easily remembered from the values
Conversion from octal or hexadecimal to binary is done by reversing the preceding procedure . Each octal digit is converted to its three digit binary equivalent. Similarly, each hexadecimal digit is converted to its four digit binary equivalent.
Binary numbers are difficult to work with because they require three or four times as many digits as their decimal equivalents.
However digital computers use binary numbers, and it is sometimes necessary for the human operator or user to communicate directly with the machine by means of such numbers.
Therefore, the relationship of the hexdecimal and octal numbers with binary system is used to reduce the bits required to specify binary quantities.
Hexadecimal is preferred over octal.
There are two types of complements for each base 'r' system: the radix: complement and the diminished radix complement. The first is referred to as the r's complement and the second as the (r  1 )'s complement.
When the value of the base 'r' is substituted in the name the two types are referred to as the 2' s complement and 1's complement for binary numbers.
Similarly it is 10's complement and 9's complement for decimal numbers.
Q. Calculate 9's complement of 546700
9's complement of a decimal number is obtained by subtracting each digit from 9.
The 9' s complement of 546700 is 999999  546700 =
453299
Q. The 9' s complement of 012398 is
= 999999  012398
= 987601
Q. The 1's complement of 1011000 is
The 1's complement of a binary number is formed by changing 1's to 0's and 0's to 1's.
So we get 0100111.
Q. The 1's complement of 0101101 is
The 1's complement of a binary number is formed by changing 1's to 0's and 0's to 1's.
So we get 1010010.
The r' s complement of an ndigit number N in base r is defined as r^{n}  N for N ≠ 0 and as 0 for N = 0.
We also note that the r's complement is obtained by adding 1 to the (r  1)'s complement
Thus, the l0' s complement of decimal 2389 is 7610 + 1 = 7611 and is obtained by adding 1 to the 9's complement value.
The 2' s complement of binary 101100 is 010011 + 1 = 010100 and is obtained by adding 1 to the 1's complement value.
The complement of the complement is the original number.
Ignore all zeros in least significant positions.
Subtract the first non zero least significant bit from 10.
Subtract all other higher significant bits from 9.
Q. Find 10's complement of 012398
The least significant digit is 8 so subtract it from 10 and we get 2.
All other higher bits are subtracted from 9.
Final answer is 987602
Q. Find 10's complement of 246700
The least significant digits are 0 so ignore them till we reach first non zero LSB which is 7. Subsract it from 10 to get 3..
All other higher bits are subtracted from 9.
Final answer is 753300
Ignore all 0's and the first 1 in least significant positions.
Change all 0's to 1 and 1's to zeros for every other bit.
Q. 2's complement of 1101100 is
Ignore all 0's and the first 1 in least significant positions.
Change all 0's to 1 and 1's to zeros for every other bit.
Finally we get 0010100
Q. 2's complement of 0110111 is
Ignore all 0's and the first 1 in least significant positions.
Change all 0's to 1 and 1's to zeros for every other bit.
Finally we get 1001001
When we subtract M  N then 'M' is referred to as 'Minuend' and 'subtraend' respectively.
Add 'M' to the r's complement of 'N'. If M ≥ N then a carry will be produced so discard it.
If M < N then no end carry is produced and so we take the r's complement of the final answer and add minus sign to it.
Q. Using 10's complement subtract 72532  3250
M has five digits and N has only four digits. Both numbers must have the same number of digits, so we write N as 03250. Taking the 10' s complement of N produces a 9 in the most significant position. The occurrence of the end carry signifies that M ≥ N and that the result is therefore positive.
Q. Using 10's complement subtract 3250  72532
There is no end carry, Therefore, the answer is 10's complement of 30718 =  69282
Q. Using 2's complement subtract 1010100  1000011 and also 1000011  1010100