Unit 1: Binary Systems
1.1 Digital Systems
1.1.1 Digital and Analog system
Analog System:
The system which can process analog quantities (Continuous data) is called an analog system. Analog system is operated by measuring rather than counting. These systems are used in scientific work, commercial and personal purpose. For example, Odometer, Speedometer, thermometer, seismograph, voltmeter, ammeter, pressure gauge etc.
Characteristics of analog system:
i. Based on continuous varying data
ii. Measure only natural or physical values.
iii. Used for special purpose
iv. Generally, no storage facility is available because they work on real time basis.
v. Accuracy of these types of computer is very less because of noise and filtering facility.
vi. Output of those signals is not well known by general public because they are in form of wave lines, curved lines or graphs.
Digital System:
The system which works on discrete data (discontinuous data, binary system or 0 and 1) is known as digital system. Binary system is such system of numbering in which only 2 digits are used 0 and 1. Where 0 represents either OFF, False, No etc. and 1 represents ON, True, Yes etc. So the basic principle of this system is either present or absence of electrical pulses in the signal. For example, IBM PC, Apple/Macintosh, IBM Compactible etc.
Characteristics of digital system:
i. Based on discrete data which are not continuous with time.
ii. Based on principle of logic 1 and 0 (high and low voltage).
iii. Used for general purpose.
iv. They are more reliable because of less noise and filtering facility.
v. It has large memory capacity because the calculations are to be stored internally for future use and re-programming.
vi. It is multipurpose and programmable. So, it is of high cost and faster processing.
a. Data normally flows from input devices or backing storage into main storage and from main storage to output devices or backing storage.
b. The processor performs operations on data from main storage and returns the results of processing to main storage.
c. In some cases, data flows directly between the processor and input or output devices rather than as described in (a).
d. The ALU and CU, combine to form the processor. The processor is sometimes also called the central processor or central processing unit (CPU). However, the term CPU is also sometimes taken to mean not only the ALU and Control unit but main storage too.
e. There are two types of flow. Solid lines carry data or instructions and dotted line carry commands or signals.
f. Data held on secondary storage may be input to main memory during processing, used and brought up-to-date using newly input data, and then returned to backing storage.
1.1.3 Advantages/disadvantages of digital system
Advantages of digital system:
· Have made possible many scientific, industrial, and commercial advances that would have been unattainable otherwise.
· Less expensive
· More reliable
· Easy to manipulate
· Flexibility and Compatibility
· Information storage can be easier in digital computer systems than in analog ones. New features can often be added to a digital system more easily too.
Disadvantages of digital system:
· Use more energy than analog circuits to accomplish the same tasks, thus producing more heat as well.
· Digital circuits are often fragile, in that if a single piece of digital data is lost or misinterpreted, the meaning of large blocks of related data can completely change.
· Digital computer manipulates discrete elements of information by means of a binary code.
· Quantification error during analog signal sampling.
1.2 Binary Numbers
1.2.1 Number System
Introduction:
In early days, people used stones, pebbles, sticks and different symbols to represent values. Such counting items were not suitable to represent big values. So, mathematicians have developed different types of number systems to represent values and perform complex calculations. The main difference of the different number system is their base number.
Base or Radix:
The base or radix of a number system is defined as the number of digits used to represent the number system. For example decimal number system uses ten digits (0,1,2,3,4,5,6,7,8,9) so its base is 10.
The different number systems are that we use in our daily life and in computer system are categorized into the following types depending upon the base:
i. Decimal or Denary number system
ii. Binary number system
iii. Octal number system
iv. Hexadecimal number system
1. Decimal or Denary Number System:
The decimal number system is the most popular number system that we use in our daily life for representing values and performing different calculations. It is base ten number system. It consists of digits from 0 to 9. The other numbers in the decimal number system are formed by combining two or more digits. For example: 23, 121, 2628, 7812 etc.
2. Binary Number System:
The binary number system is the base two number system. It has just two digits: 0 and 1. Each digit in binary number system is known as BIT (Binary Digit). Other numbers in this system are formed by combining these two digits more than ones like 11, 110, 1101, 11101 etc. Each position in a binary number represents a power of the base. Numbers in the binary
number system are read digit by digit. For example, binary number 100 is read as one zero zero and 101 is read as one zero one. It is subscripted by 2 or B. For example, (101)2 or (101)B.
3. Octal Number System:
Octal number system is the base eight number system. The digits used in this number system are the numbers from 0 to 7. The largest digit of octal number system is 7. Other numbers are formed by combining one or more digits of octal number system. Each position
in an octal number represents a power of the base. It is subscripted by 8 or O. For example,
(126)8 or (126)O.
4. Hexadecimal Number System:
Hexadecimal number is the base sixteen number system. The digits of the hexadecimal number system are numbers from 0 to 9 and symbols (A to F). The six alphabets A, B, C, D, E and F represent the decimal numbers 10, 11, 12, 13, 14 and 15 respectively. The largest single digit if F in this number system. Other numbers are formed by combining digits of
hexadecimal number like 108, AB5, 3D9 and 3E4B. It is subscripted by 16 or H. For example, (A26)16 or (A26)H.
1.3 Binary Codes
Electronic digital systems use signals that have two distinct values and circuit elements that have two stable states. There is a direct analogy among binary signals, binary circuit elements, and binary digits. A binary number of n digits, for example, may be represented by n binary circuit elements, each having an output signal equivalent to a 0 or a 1. Digital systems represent and manipulate not only binary numbers, but also many other discrete elements of information. Any discrete element of information distinct among a group of quantities can be represented by a binary code. Binary codes play an important role in digital computers. The codes must be in binary because computers can only hold 1's and 0's.
1.3.1 BCD (Binary Coded Decimal) codes:
The binary number system is the most natural system for a computer, but people are accustomed to the decimal system. So, to resolve this difference, computer uses decimals in coded form which the hardware understands. A binary code that distinguishes among 10 elements of decimal digits must contain at least four bits. Numerous different binary codes can be obtained by arranging four bits into 10 distinct combinations. The code most commonly used for the decimal digits is the straightforward binary assignment listed in the table below. This is called binary-coded decimal and is commonly referred to as BCD.
Decimal
|
BCD
|
0
|
0000
|
1
|
0001
|
2
|
0010
|
3
|
0011
|
4
|
0100
|
5
|
0101
|
6
|
0110
|
7
|
0111
|
8
|
1000
|
9
|
1001
|
· A number with n decimal digits will require 4n bits in BCD. E.g. decimal 396 is represented in BCD with 12 bits as 0011 1001 0110.
· Numbers greater than 9 has a representation different from its equivalent binary number, even though both contain 1's and 0's.
· Binary combinations 1010 through 1111 are not used and have no meaning in the BCD code.
· Example: (185)10 = (0001 1000 0101)BCD = (10111001)2
1.3.2 Error-detection codes:
Binary information can be transmitted from one location to another by electric wires or other communication medium. Any external noise introduced into the physical communication medium may change some of the bits from 0 to 1 or vice versa.
The purpose of an error-detection code is to detect such bit-reversal errors. One of the most common ways to achieve error detection is by means of a parity bit. A parity bit is the extra bit included to make the total number of 1's in the resulting code word either even or odd. A message of 4-bits and a parity bit P are shown in the table below:
Error Checking Mechanism:
· During the transmission of information from one location to another, an even parity bit is generated in the sending end for each message transmission. The message, together with the parity bit, is transmitted to its destination. The parity of the received data is checked in the receiving end. If the parity of the received information is not even, it means that at least one bit has changed value during the transmission.
· This method detects one, three, or any odd combination of errors in each message that is transmitted. An even combination of errors is undetected. Additional error-detection
schemes may be needed to take care of an even combination of errors.
1.3.3 Reflected code (Gray Code)
It is a binary coding scheme used to represent digits generated from a mechanical sensor that may be prone to error. Used in telegraphy in the late 1800s, and also known as "reflected binary code”. Gray code was patented by Bell Labs researcher Frank Gray in 1947. In Gray code, there is only one bit location different between two successive values, which make mechanical transitions from one digit to the next less error prone. The following chart shows normal binary representations from 0 to 15 and the corresponding Gray code.
The Gray code is used in applications where the normal sequence of binary numbers may produce an error or ambiguity during the transition from one number to the next. If binary numbers are used, a change from 0111 to 1000 may produce an intermediate erroneous number 1001 if the rightmost bit takes more time to change than the other three bits. The Gray code eliminates this problem since only one bit changes in value during any transition between two numbers.
Binary to gray code conversion
Binary to gray code conversion is a very simple process. There are several steps to do these types of conversions. Steps given below elaborate on the idea on this type of conversion.
(1) The M.S.B. of the gray code will be exactly equal to the first bit of the given binary number.
(2) Now the second bit of the code will be exclusive-or of the first and second bit of the given binary number, i.e. if both the bits are same the result will be 0 and if they are different the result will be 1.
(3)The third bit of gray code will be equal to the exclusive-or of the second and third bit of the given binary number. Thus the Binary to gray code conversion goes on. One example given below can make your idea clear on this type of conversion.
For example: (01001)2= (?)Gray
0 à 0
0Å1 à 1
1Å0 à 1
0Å0 à 0
0Å1 à1
i.e. (01001)2= (1101)Gray
1.3.4 Alphanumeric codes (ASCII, EBCDIC):
Alphanumeric character set is a set of elements that includes the 10 decimal digits, 26 letters of the alphabet and special characters such as $, %, + etc. It is necessary to formulate a binary code for this set to handle different data types. If only capital letters are included, we need a binary code of at least six bits, and if both uppercase letters and lowercase letters are included, we need a binary code of at least seven bits.
ASCII (American Standard Code for Information Interchange):
The standard binary code for the alphanumeric characters is called ASCII (American Standard Code for Information Interchange). It uses seven bits to code 128 characters as shown in the table below. The seven bits of the code are designated by B1 through B7 with B7 being the most significant bit.
EBCDIC character code
EBCDIC (Extended Binary Coded Decimal Interchange Code) is another alphanumeric code used in IBM equipment. It uses eight bits for each character. EBCDIC has the same character symbols as ASCII, but the bit assignment for characters is different. As the name implies, the binary code for the letters and numerals is an extension of the binary-coded decimal (BCD) code. This means that the last four bits of the code range from 0000 through 1001 as in BCD.
1.4 Integrated Circuits
An Integrated circuit is an association (or connection) of various electronic devices such as resistors, capacitors and transistors etched (or fabricated) to a semiconductor material such as silicon or germanium. It is also called as a chip or microchip. An IC can function as an amplifier, rectifier, oscillator, counter, timer and memory. Sometime ICs are connected to various other systems to perform complex functions.
1.4.1 Concept of DIP, SIMM, linear and digital ICs
Types of ICs
ICs can be categorized into two types
· Analog or Linear ICs
· Digital or logic ICs
Further there are certain ICs which can perform as a combination of both analog and digital functions.
Analog or Linear ICs: They produce continuous output depending on the input signal. From the name of the IC we can deduce that the output is a linear function of the input signal. Op-amp (operational amplifier) is one of the types of linear ICs which are used in amplifiers, timers and counters, oscillators etc.
Digital or Logic ICs: Unlike Analog ICs, Digital ICs never give a continuous output signal. Instead it operates only during defined states. Digital ICs are used mostly in microprocessor and various memory applications. Logic gates are the building blocks of Digital ICs which operate either at 0 or 1.
0 Comments