Cte 121

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic

envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
Digital Computer Fundamentals I
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic

CTE 121
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
e n v i l l e p o l y t e c h n i c e n v i l l e p o l y t e c h n i c e n v i l l e p o l y t e c h n i cEnville
e n v i l l e pPolytechnic
olytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
Elijah Emmanuel
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
envillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnicenvillepolytechnic
CHAPTER 1
THE CONCEPT OF DATA AND INFORMATION PRESENTATION IN DIGITAL SYSTEM

Digits of a Number: This is defined as a single symbol used alone (e.g “3”) or in combination (e.g “37”) to
represent number in a positional number system. The ten numerical digits are in order of their value
arranged as: 0,1,2,3,4,5,6,7,8,9.

Number Base: This is also called positional number system or number system. It is defined as the number
of unique digits including zero, used to represent number. In any standard positional number system, a
number is conventionally written as xy with x as the string of digits and y as its base or radix.
Note: for number in base ten, the base is usually assumed and therefore omitted.

Types of Number System


In the digital computer, there are various types of number systems used for representing information.
Below is the list of number of digits available in the various number systems:
1. Base 10 or Denary or Decimal Number System: (0,1,2,3,4,5,6,7,8,9)
2. Base 8 or Octal Number System: (0,1,2,3,4,5,6,7)
3. Base 2 or Binary Number System: (0,1)
4. Base 16 or Hexadecimal (hex) number system: (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)

Positional or Weighted Number System


Number systems are represented by a string of digits where each digit position has an associated weight. The
value of the number is a weight sum of the digits.

Example
a. 1734 = (1 x 1000) + (7 x 100) + (3 x 10) + (4 x 1)
b. 568.23 = (5 x 100) + (6 x 10) + (8 x 1) + (2 x 0.1) + (3 x 0.01)
c. EGN.DR = (E x 102) + (G x 101) + (N x 100) + (D x 10-1) + (R x 10-2) In general.

https://www.javatpoint.com/python-tutorial

CONVERSION OF NUMBER SYSTEM


Decimal to Binary Conversion
Decimal numbers can be converted to binary by repeated division of the number by 2 while recording the
remainder. Let’s take an example to see how this happens.
Example 2. Convert 421510 to its binary equivalent

Solution:

Therefore, 421510 =10000011101112
2. Convert the following decimal numbers to their binary equivalents:
(a) 0.375
Solution:

Decimal Numbers to Binary Number Conversion Table


Multiplication Integer Fraction
0.375 × 2 = 0.75 0 .75
0.75 × 2 = 1.5 1 .5
.5 × 2 = 1.0 1 0
Therefore, 0.37510 = 0.0112
3. Convert (56.75)10 to its binary equivalent.
Solution:
At first we find the binary equivalent of 56.

Therefore, 5610 = 1110002


The binary equivalent of 0.75 is obtained below:

Decimal Numbers to Binary Number Conversion


Table
Multiplication Integer Fraction
0.75 × 2 = 1.5 1 .5
0.5 × 2 = 1.0 1 0

Therefore, 0.7510 = 0.112


Hence 56.7510 = 111000.112

Binary to Decimal Conversion


Example-1 − Convert binary number 11001010 into decimal number
Solution

Example-2 − Convert binary number 1010.1011 into decimal number


Solution

Decimal to Octal
Decimal numbers can be converted to octal by repeated division of the number by 8 while recording the
remainder. Let’s take an example to see how this happens.
Reading the remainders from bottom to top,
47310 = 7318

Example 3
Convert the decimal numbers to their octal equivalents: (a) 2980
Solution:
2980

Hence 298010 = 56448

(b) 0.685
Solution:
0.685

Decimal Numbers to Binary Number Conversion Table


Multiplication Integer Fraction
0.685 × 8 = 5.480 5 .48
0.48 × 8 = 3.84 3 .84
.84 × 8 = 6.72 6 .72
.72 × 8 = 5.76 5 .76
Therefore, 0.68510 = (0.5365…)8

Conversion from Octal to Decimal


Example 1: Convert 2738 to decimal
                   = 2 × 82 + 7 × 81 + 3 × 80
                   = 128 + 56 + 3
                   = 18710

Example 2: Convert 545618 to denary


= 5x84+4x83+5x82+6x81+1x80
= 20,480+1,536+320+48+1
= 2238510

Decimal to Hexadecimal and Vice Versa


Decimal numbers can be converted to octal by repeated division of the number by 16 while recording the
remainder. Let’s take an example to see how this happens.

Reading the remainders from bottom to top we get,


42310 = 1A716

1. Convert B6A16 to its decimal equivalent.


Solution:
B6A16
= 11 × 162 + 6 × 161 + 10 × 160
= 2816 + 96 + 10
= 292210
Therefore, B6A16 = 292210

2. Convert 391710 to its hexa-decimal equivalent


Solution:
391710

Therefore, 391710 = F4D16


Binary to Octal and Vice Versa
To convert a binary number to octal number, these steps are followed −
 Starting from the least significant bit, make groups of three bits.
 If there are one or two bits less in making the groups, 0s can be added after the most significant bit
 Convert each group into its equivalent octal number
Let’s take an example to understand this.

101100101012 = 26258
To convert an octal number to binary, each octal digit is converted to its 3-bit binary equivalent according to
this table.
Octal Digit 0 1 2 3 4 5 6 7

Binary Equivalent 000 001 010 011 100 101 110 111
546738 = 1011001101110112

Binary to Hexadecimal
To convert a binary number to hexadecimal number, these steps are followed −
 Write down the binary number and group the digits in set of four starting from right to left.
 If the leftmost group doesn’t have enough digits to make up the set of four, add extra 0’s to make a
group.
 Convert each group into its equivalent number.
Let’s take an example to understand this.

10110110101   2

0101 1011 0101


5 B 5
WHY BINARY NUMBER SYSTEM IS USED IN DIGITAL SYSTEM
Binary Numbers are the flow of information in the form of zeros and ones used by digital computers and
systems

Unlike a linear, or analogue circuits, such as AC amplifiers, which process signals that are constantly
changing from one value to another, for example amplitude or frequency, digital circuits process signals that
contain just two voltage levels or states, labelled, Logic “0” and Logic “1”.

Generally, logic “1” represents a higher voltage, such as 5 volts, which is commonly referred to as a HIGH
value, while logic “0” represents a low voltage, such as 0 volts or ground, and is commonly referred to as a
LOW value. These two discrete voltage levels representing the digital values of “1’s” (one’s) and “0’s”
(zero’s) are commonly called: BInary digiTS, and in digital and computational circuits and applications they
are normally referred to as binary BITS.

Binary Bits of Zeros and Ones

Because there are only two valid Boolean values for representing either a logic “1” or a logic “0”, makes the
system of using Binary Numbers ideal for use in digital or electronic circuits and systems.

Digital Logic Levels


In all electronic and computer circuits, only two logic levels are allowed to represent a single state. These
levels are referred to as logic 1 or logic 0, HIGH or LOW, True or False, ON or OFF. Most logic systems
use positive logic, in which case logic “0” is represented by zero volts and logic “1” is represented by a
higher voltage.
Digital Value Representation
First State Second State
Logic “0” Logic “1”
LOW HIGH
FALSE TRUE
Low Level Voltage Output High Level Voltage Output
0V or Ground +5 Volts

The Special Relationship between Binary, Octal and Hexadecimal Number Systems
Now let's compare the number 827.2510 using the four number systems we have discussed. The table below
gives the value of this number in binary, octal, decimal, and hexadecimal.
When we order these numbers by the size of the base, we can see a general pattern: the smaller the base, the
more digits that are needed to represent the same number. We can also see a special relationship between
three of these number systems. Binary, octal, and hexadecimal all have bases that are powers of 2. This
relationship allows us to convert between these systems quite easily.
To convert 1473.28 to binary, we simply replace each digit with an equivalent 3-bit binary number.

We can see the 3 to 1 relationship between octal and binary when we compare their bases. Octal has a base
of 8 or 23 and binary has a base of 2 or 2 1. As you might guess, binary and hexadecimal have a 4 to 1
relationship since the base of hexadecimal is 16 or 24. We can also convert easily between binary and
hexadecimal using this 4 to 1 relationship.

Since octal and hexadecimal are easy to convert to binary, they are often used as a shorthand method for
writing binary numbers. For example, the code for the color blue in this text is 0033CC16 which is much
easier to read and write than the binary number below which is what the computer actually understands.

0000000000110011110011002 = BLUE

The Advantages of Octal and Hexadecimal over the Binary Data


We use them for convenience and brevity: Hexadecimal and Octal are really outstanding compressed
representations of binary. Hex in particular is well suited to condensed forms of memory addresses. Every
octal digit directly maps to 3 binary bits and every hexadecimal digit to 4 binary bits. This is a result of the
bases (8 and 16) being powers of 2 (2323 and 2424). For example, I can write binary 0110100101101001 as
hexadecimal 6969 or if I extend it with a leading zero as octal 151151.
So, say you need a 64 bit memory addresses. You can either look at all 64 binary bits, or get it condensed to
16 hexadecimal digits.

The various binary based codes


1. Binary Coded Decimal or BCD or 8421 Code: The decimal numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 can be
expressed in Binary numbers as shown in the following table. All these binary numbers again expressed
in the last column by expanding into 4 bits. As per the weighted binary digits, the 4 Bit binary numbers
can be expressed according to their place value from left to right as 8421 (2³ 2² 2¹ 2⁰ = 8421). Therefore
BCD is a weight code..
2. Excess-3 code: The Excess-3 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
310 to each code word in 8421. The excess-3 codes are obtained as follows

Example

3. Gray Code: It is the non-weighted code and it is not arithmetic codes. It has a very special feature, in
converting BCD code to gray code, you follow the following steps:
i. Record the MSB as it is
ii. Add the MSB to the next bit, record the um and neglect the carry
iii. Repeat the process
4. ASCII CODE: ASCII stands for American Standard Code for Information Interchange. Computers can
only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or
'@' or an action of some sort. It is a character encoding based on the English alphabet. The first 32
characters in the ASCII-table are unprintable control codes and are used to control peripherals such as
printers.

You can get the full list online by visiting: https://ascii-code.net/


5. Seven Segment Displays: Seven segment displays are the output display device that provides a way to
display information in the form of image or text or decimal numbers which is an alternative to the more
complex dot matrix displays. It is widely used in digital clocks, basic calculators, electronic meters, and
other electronic devices that display numerical information. It consists of seven segments of light
emitting diodes (LEDs) which is assembled like numerical 8.  Seven Segment Displays can also be used
for representing hexadecimal digits.

Note: to
convert
from either
binary or
BCD code
to Seven

6. Unicode: Is an international encoding standard use with different languages and scripts, by which each
letter, digit, or symbol is assigned to a unique numeric value that applies across different platforms and
programs. Below are the examples of Unicode. UNICODE function in excel “returns the number (code
point) corresponding to the first character of the text.” UNICODE is an encoding method that can be
applied for different encodings for the likes of UTF-8, UTF-16, etc. and was first introduced in Excel
2013 version. If you are using earlier versions, then you will not see this function.
In most of the websites, UTF-8 is the common encoding, and the first 128 characters are from the ASCII
character set. Some of the examples for UNICODE commonly used are and more:
CHAPTER 2

THE DIFFERENT CODES USED IN DIGITAL SYSTEM

BINARY OPERATIONS
1. Binary Addition
Since binary number is number in base 2, if the sum of the bits is up to 2, write 0 and carry 1. Therefore in
binary:
0+0=0
0+1=1
1+0=1
1 + 1 = 1 0 (which is zero carry 1)
1 + 1 + 1 = 11 (which is one carry 1)

Example 1: 1000111
+0010110
1011101

Example 2: 1001
+1111
11000

Example3: 11.011
+10.110
110.001

2. Binary Subtraction
In binary subtraction, whatever thing you borrow is 2 and not 10 as in denary. This is for cases where you
cannot subtract one from 0.
0–0=0
1–1=0
1–0=1
0 – 1 = 1 0 (with a borrow of 1 which is 2)

Example 1: 1001
-101
0100

Example 2: 10000
-11
01101

Example 3: 110.01
-100.10
001.11

3. Binary Multiplication
Rule for binary multiplication are:
0x0=0
0x1=0
1x0=0
1x1=1

Example 1: 110
x100
000
000
110 .
11000

Example 2:  1011.01

× 110.1
Solution:

Note: the decimal point is placed three places from the LSB. Because in 1011.01, the decimal point is 2
places from the LSB and in 110.1, the decimal point is placed 1 place from the LSB.

Example 3:
1010
×101
1010
0000
01010
1010 .
110010

4. Binary Division
The main rules of the binary division include:
1÷1 = 1
1÷0 = Meaningless
0÷1 = 0
0÷0 = Meaningless
Therefore, 1111100 ÷ 10 = 111110

Example 2: 101101 ÷ 101

∴ 101101 ÷ 101 = 1001

SIGNED BINARY NUMBERS


Signed Binary Numbers is the binary sign of a binary number showing whether it is either positive or
negative.
1. Positive Signed binary numbers
The binary numbers having their MSB (Most Significant Bit) 0 are called “Positive signed binary numbers”.

2. Negative Signed binary numbers


The binary numbers having their MSB (Most Significant Bit) 1 are called “Negative signed binary
numbers”.
N’S COMPLEMENT
1's complement
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is called as taking
complement or 1's complement. Example of 1's Complement is as follows.

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.

Addition and Subtraction using 1’s Complement


Example 1
Add + 1110 and - 1101
Solution:
            + 1 1 1 0      ⇒      0 1 1 1 0
            - 1 1 0 1      ⇒      1 0 0 1 0      (taking 1’s complement)
                                      0 0 0 0 0
                                                  1 carry
                                       0 0 0 0 1
Hence the required sum is + 0001
Example 2
Add + 1101 and - 1011
Solution:
           + 1 1 0 1      ⇒      0 1 1 0 1
            - 1 0 1 1      ⇒      1 0 1 0 0      (taking 1’s complement)
                                       0 0 0 0 1
                                                 1  carry
                                        0 0 0 1 0
Hence the required sum is + 0010

Example 3
Add + 1010 and - 1100
Solution:
           + 1 0 1 0      ⇒      0 1 0 1 0
            - 1 1 0 0      ⇒      1 0 0 1 1      (1’s complement)
                                       1 1 1 0 1
Hence the required sum is – 0010. (1’s complement)

Example 4
Add (ii) -0110 and -0111.
Solution:
            - 0 1 1 0      ⇒      1 1 0 0 1      (1’s complement)
            - 0 1 1 1      ⇒      1 1 0 0 0      (1’s complement)
                                      1 0 0 0 1
                                                  1 carry
                                       1 0 0 1 0
Hence the required sum is - 1101 (1’s complement of 0010)

Assignment
i. Add -1010 and -0101
ii. + 0011 and - 1101

Limitation of 1’s Complement


Basically the disadvantage of using 1’s compliment form is that the MSB takes an extra meaning. That is:
i. If the MSB is 0, it indicates that the number is positive
ii. If the MSB is 1, it indicates that the number is negative

Addition and Subtraction using 2’s Complement


Example 1
Find the sum of -1011 and -0101
Solution:
                    + 1 0 1 1           ⇒          0 1 0 1 1
                     - 0 1 0 1           ⇒          1 1 0 1 1     (2’s complement)
             (Carry 1 discarded)               0 0 1 1 0

Hence the sum is + 0110


Example 2
Find the sum of + 0 0 1 1 and - 0 1 0 1
Solution:
                    + 0 0 1 1           ⇒          0 0 0 1 1
                     - 0 1 0 1           ⇒          1 1 0 1 1     (2’s complement)
                                                        1 1 1 1 0
2’s complement of 1110 is (0001 + 0001) or 0010.
Hence the required sum is - 0010.

Example 3
Find the sum of – 0011 and – 0101
Solution:
                    - 0 0 1 1           ⇒          1 1 1 0 1          (2’s complement)
                    - 0 1 0 1           ⇒          1 1 0 1 1          (2’s complement)
            (Carry 1 discarded)               1 1 0 0 0
2’s complement of 1000 is (0111 + 0001) or 1000.
Hence the required sum is – 1000

Assignment
Add the following using 2’s complement:
i. + 0111 and – 0011
ii. + 0 1 0 0 and - 0 1 1 1
iii. -0111 and – 0010

FIXED POINT AND FLOATING POINT NUMBERS


In digital technology, data is stored in memory registers with binary bits ‘0’s and ‘1’s because the computer
only understands binary language. When we enter data in the system, it is converted into binary bits, and it is
processed and used in the CPU in different ways. Memory registers have a format and a specific range to
store data. Scientists have designed a real number representation method in memory registers of 8 bit, 16 bit,
32bit.
The two types of approaches developed to store or represent real numbers are:
i. Fixed point number representation
ii. Floating point number representation

Fixed Point Number Representation: In this method of number representation, data is converted into
binary form and then data processed, stored and used by the system.  

Sign bit: A positive number has a sign bit “0”, while a negative number has a sign bit “1”.
Integral Part: The integral part is of different lengths at different places. It depends on the register’s size,
like in an 8-bit register, integral part is 4 bits.
Fractional part: Fractional part is also of different lengths at different places. It depends on the register’s
size, like in an 8-bit register; integral part is of 3 bits.

Note: 8 bits has 1Sign bit + 4 bits (integral) + 3bits (fractional part)


16 bits has 1Sign bit + 9 bits (integral) +6 bits (fractional part)
  32 bits has 1Sign bit + 15 bits (integral) + 9 bits (fractional part)

Steps in Fixed Point Number Representation


i. Convert the number into binary form
ii. Represent binary number in Fixed point notation

Example
Represent the following in fixed point notation
i. 4.510
ii. -15.87510
iii. +15.87510
Solution
i.

ii.

iii.

Note: Fixed point notation ranges from -15.875 to +15.875 which is very small. It is not suitable for
presenting large amount of data, so it is not used in computer nowadays.
Scientists feel that the system needs new representation format with no limit therefore they came up with
floating point representation.

Floating point number representation


Floating is used to represent large number or small values or values that require a high degree of precision.
The floating-point notation has two types of notation
1. Scientific notation
2. Normalized notation
Scientific notation
This is a standard way of representing number scientifically. Example of numbers in scientific notation are:
 2.99x108 m/s speed of light
 6.02x1023 /mol Avogadro’s number
 1.60x10-19 C Charge of electron
 4.35x1017 s Age of the universe
Considering one of the values above: 6.02 x 1023 (exponent)
(Mantissa)
Note: The number of digits used in the mantissa determines the precision of the number and the number
of digits used in the exponent determines the range.

To represent the values above in a digital computer, it has to be first converted from denary to binary that is;
The mantissa and the exponent will be in binary form, and the base will become 2 as shown in the examples
below:

Example 1:
Represent 6.5 x 103 in floating point using 16 bits register
Sol.
 The mantissa: 6.510 = 110.12
 The exponent: 310 = 112
 Since both mantissa and exponent positive number, we write zero to precede each indicating positive
sign bit i.e. 0110.1 and 011 respectively.
 Using 16 bits register, the mantissa will have 10 bits and the exponent 6 bits as shown below:

0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1
Mantissa Exponent

∴ 6.5 x 103 = 110.1 x 211

Example 2:
Represent the floating point below in denary

0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0
Mantissa Exponent

Exponent has 0.000010 = 22


Mantissa has 010.101000 = 2.625.
∴ The number is 2.625 x 102

Note: The number of time you count the mantissa from the sign bit to either right or left to determine the
decimal place is based on the value and sight bit of the exponent.
Binary Conversion Scale:
32 16 8 4 2 1 0.5 0.25 0.12 0.0625
5

Example 3:
0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0
Mantissa Exponent

Sol.
Exponent = -2
Mantissa = 0.001 = 0.125
∴ 010000000102 = 0.12510

Exercise
Convert the following floating point binary numbers into denary using 16 bits register and both mantissa and
exponent in 2’s complement. (i)0110110000000100 (ii)0101000000111111. Answer (i) 13.510 (ii) 0.312510

CHAPTR 3
MINIMIZATION AND SIMPLIFIFICATION OF COMBINATIONAL DIGITAL CIRCUITS

Venn diagrams are the diagrams that are used to represent the sets, relation between the sets and operation
performed on them, in a pictorial way.

Venn diagram of two sets

We can use the below formula to solve the problems based on two sets.
n(X ⋃ Y) = n(X) + n(Y) – n(X ⋂ Y)

Venn diagram of three sets

The formula used to solve the problems on Venn diagrams with three sets is given below:
n(A ⋃ B ⋃ C) = n(A) + n(B) + n(C) – n(A ⋂ B) – n(B ⋂ C) – n(A ⋂ C) + n(A ⋂ B ⋂ C)

Venn Diagrams of Set operations


In set theory, there are many operations performed on sets, such as:
 Complement of set
 Intersection of set
 Union of Set
 Difference of set

Complement of set
A’ is the complement of set A. This set contains all the elements which are not there in set A.

A + A’ = U 
It means that the set formed with elements of set A and set A’ combined is equal to U.
(A’)’= A
The complement of a complement set is a set itself.
Properties of Complement of set:
A ∪ A′ = U
A ∩ A′ = φ
(A ∪ B)′ = A′ ∩ B′
(A ∩ B)′ = A′ ∪ B′
U′ = φ
φ′ = U

Intersection of two sets


A intersection B is given by: A ∩ B = {x : x ∈ A and x ∈ B}.
This represents the common elements between set A and B

Properties of the intersection of sets operation:


A∩B=B∩A
(A ∩ B) ∩ C = A ∩ (B ∩ C)
φ∩A=φ;U∩A=A
A∩A=A
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

Union of Two Sets


A union B is given by: A ∪ B = {x | x ∈A or x ∈B}.
This represents the combined elements of set A and B 

Some properties of Union operation:


A∪B=B∪A
(A ∪ B) ∪ C = A ∪ (B ∪ C)
A∪φ=A
A∪A=A
U∪A=U

Difference between Two Sets


A – B: This is read as A difference B. Sometimes, it is also referred to as ‘relative complement’. This
represents elements of set A which are not there in set B
https://instrumentationtools.com/topic/boolean-relationships-on-venn-diagrams/

https://www.allaboutcircuits.com/textbook/digital/chpt-8/boolean-relationships-on-venn-diagrams/

You might also like