5. Number System & Logic Gate
5. Number System & Logic Gate
Number System
Each key (representing character, special symbol, function keys, etc.) of the keyboard is internally mapped to an
ASCII code following an encoding scheme. This encoded value is further converted to its equivalent binary
representation so that the computer can understand it. Modern day computers use four types of Number
representation – Binary, Decimal, Octal & Hexadecimal.
https://lh6.googleusercontent.com/IkcpAFNOnN4Jba0g5TcNt7luQxIBi512Hrmp1YNMv79ApyE_LhH6ElClot4RfC
5lyeS5GYOhdEKwyMR9TcszVmN-ucod34XreCcq5T7E62Xi-7pP1-avTOCsgVtw4LxxlwedVCw
Every number system has a set of unique characters or literals. The count of these literals is called the radix or
base of the number system.
Binary Number System – The IC (Integrated Circuits) in a computer are made up of a large number of transistors
which are activated by the electronic signals (low/high) they receive. The ON/high and OFF/low state of a
transistor is represented using the two digits 1 and 0, respectively from the binary number system. This system
is also referred to as base-2 system as it has two digits only. Some examples of binary numbers are 1001011,
1011.101, 111111.01. A binary number can be mapped to an equivalent decimal number that can be easily
understood by the human.
Decimal Number System – It is known as the base-10 system since 10 digits (0 to 9) are used. A number is
presented by its two values — Name/Symbol value (any digit from 0 to 9) and positional value (in terms of base
value). Eg., 128.13
Octal Number System – Octal number system was devised for compact representation of the binary numbers.
Octal number system is called the base-8 system as it has a total eight digits (0-7), and positional value is
expressed in powers of 8.
Hexadecimal Number System – These numbers are also used for compact representation of binary numbers. It
consists of 16 unique symbols (0 – 9, A–F), and is called base- 16 system.
Decimal
(base 10)
Hexadecimal
(base 16)
Octal
(base 8)
Binary
(base 2)
10
11
12
13
14
15
16
17
.
.
31
32
10 (1+0)
11
.
.
1F
20 (2+0)
000
001
002
003
004
005
006
007
010
011
012
013
014
015
016
017
020
021
.
.
037
040
00000000
00000001
00000010
00000011
00000100
00000101
00000110
00000111
00001000
00001001
00001010
00001011
00001100
00001101
00001110
00001111
00010000
00010001
.
.
00011111
00100000
Encoding Scheme:
The mechanism of converting data into an equivalent cipher using specific code is called encoding. Thus each
alpha-numeric character entered through a keyboard is encoded into binary equivalent through a specific
Encoding Scheme so that it can be understood & processed by a CPU. Some of the well-known encoding
schemes are described below.
The encoding scheme ASCII was developed for standardizing the character representation in the early days of
computers. Due to its ease of representation, ASCII is still the most commonly used coding scheme. Initially
ASCII used 7 bits to represent characters. Recall that there are only 2 binary digits (0 or 1). Therefore, the total
number of different characters on the English keyboard that can be encoded by 7-bit ASCII code is 2^7 = 128
(from 0 to 127). But ASCII is able to encode a character set of the English language only.
In order to facilitate the use of Indian languages on computers, a common standard for coding Indian scripts
called ISCII was developed in India during the mid-1980s. It is an 8-bit code representation for Indian languages
which means it can represent 2^8=256 characters. It retains all 128 ASCII codes and uses the rest of the codes
(128) for additional Indian language character sets.
Advantages:
There were many encoding schemes, for character sets of different languages. But they were not able to
communicate with each other, as each of them represented characters in their own ways. Hence, text created
using one encoding scheme was not recognised by another machine using a different encoding scheme.
Therefore, a standard called UNICODE has been developed to incorporate all the characters of every written
language of the world. Commonly used UNICODE encodings are UTF-8, UTF-16 and UTF-32. It is a superset of
ASCII.
Extended Binary Coded Decimal Interchange Code (EBCDIC) is an eight-bit character encoding descended from
the code used with punched cards. There were numerous difficulties writing software that would work in both
ASCII and EBCDIC, eventually leading to its failure.
ITU was established in 1865 and headquartered at Geneva, Switzerland. The ITU promotes the shared global use
of the radio spectrum, facilitates international cooperation in assigning satellite orbits, assists in developing and
coordinating worldwide technical standards, and works to improve telecommunication infrastructure in the
developing world.
The International Organization for Standardization's process for creating a new standard starts when industry
associations or consumer groups make a request. ISO then recruits subject matter experts and industry
stakeholders who form a technical committee. The committee goes through two rounds of creating a draft
standard and conducts a formal vote on the second draft, which is called the Final Draft International Standard
(FDIS), then ISO publishes it as an official international standard.
The IEEE is a professional association that develops, defines, and reviews electronics and computer science
standards. It is a non-profit organization that is dedicated to advancing the theory and application of electrical
and electronics engineering and computer science. Through its members, the IEEE is a leading authority on
areas ranging from aerospace, computers, and telecommunications to biomedicine, electric power, and
consumer electronics.
The ANSI is a non-profit organisation that provides accreditation for standards developed by other standards
organizations, companies, consumer groups, government agencies, and other bodies.
Logic Gates
A logic gate is an idealized model of computation or physical electronic device implementing a Boolean
function, a logical operation performed on one or more binary inputs that produces a single binary output. Logic
gates are primarily implemented using diodes or transistors acting as electronic switches.
Logic circuits include such devices as multiplexers, registers, arithmetic logic units (ALUs), and computer
memory, all the way up through complete microprocessors, which may contain more than 100 million gates.
i. Logic gates are the basic building blocks of any digital system, here it receives one or more inputs and
produces a single binary output (either 0 or 1) based on certain logic.
ii. Based on the function performed, logic gates are classified as AND, OR, NOT, EXOR, EXNOR, NAND & NOR
gates.
Gate
Representation
Function
AND
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/AND.gif
Multiplication
OR
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/OR.gif
Addition
NOT
(Inverter)
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/NOT1.gif
Inversion
NAND
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/NAND.gif
NOR
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/NOR.gif
X-OR
(Exclusive OR)
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/EOR.gif
X-NOR
(Exclusive NOR)
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/ENOR.gif
Equivalence Gate
Note – The NAND and NOR gates are called Universal Gates since with any one of them, the basic functions -
AND, OR and NOT can be generated.
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/nottable.gif
http://www.ee.surrey.ac.uk/Projects/CAL/digital-logic/gatesfunc/graphics/summarytable.gif