1. Computer Logical Organization : Introduction In the modern world of electronics, the term Digital is generally associated with a computer because the term Digital is derived from the way computers perform operation, by counting digits . For many years, the application of digital electronics was only in the computer system. But now-a-days, digital electronics is used in many other applications. Following are some of the examples in which Digital electronics is heavily used. Industrial process control Military system Television Communication system Medical equipment Radar Navigation
1.1 Signal Signal can be defined as a physical quantity, which contains some information. It is a function of one or more than one independent variables. Signals are of two types. Analog Signal Digital Signal
1.1.1 Analog Signal An analog signal is defined as the signal having continuous values. Analog signal can have infinite number of different values. In real world scenario, most of the things observed in nature are analog. Examples of the analog signals are following. Temperature Pressure Distance Sound Voltage Current Power
1.1.1 Graphical representation of Analog Signal (Temperature) The circuits that process the analog signals are called as analog circuits or system. Examples of the analog system are following. Filter Amplifiers Television receiver Motor speed controller
1.1.1 Disadvantage of Analog Systems Less accuracy Less versatility (No capability to carry multiple tasks) More noise effect More distortion (that occurs when the output signal does not have a linear relation to the input signal.) More effect of weather
1.1.2 Digital Signal A digital signal is defined as the signal which has only a finite number of distinct values . Digital signals are not continuous signals . In the digital electronic calculator , the input is given with the help of switches. This input is converted into electrical signal which have two discrete values or levels. One of these may be called low level and another is called high level . The signal will always be one of the two levels. This type of signal is called digital signal . Examples of the digital signal are following. Binary Signal Octal Signal Hexadecimal Signal
1.1.2 Graphical representation of the Digital Signal (Binary) The circuits that process the digital signals are called digital systems or digital circuits . Examples of the digital systems are following. Registers Flip-flop Counters Microprocessors
1.1.2 Advantage of Digital Systems More accuracy More versatility Less distortion Easy communicate Possible storage of information
1.1.3 Comparison of Analog and Digital Signal S.N. Analog Signal Digital Signal 1. Analog signal has infinite values. Digital signal has a finite number of values. 2. Analog signal has a continuous nature. Digital signal has a discrete nature. 3. Analog signal is generated by transducers and signal generators. Digital signal is generated by A to D converter. 4. Example of analog signal − sine wave, triangular waves. Example of digital signal − binary signal. Note : A transducer is a device that converts one form of energy to another form of energy. Energy types include/(but are not limited to) electrical, mechanical, electromagnetic (including light), chemical, acoustic, and thermal energy.
1.2 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.
1.2.1 Advantages of Binary Codes Following is the list of advantages that binary code offers. Binary codes are suitable for the computer applications. Binary codes are suitable for the digital communications. Binary codes make the analysis and designing of digital circuits if we use the binary codes . Since only 0 & 1 are being used, implementation becomes easy .
1.2.2 Classification of Binary Codes The codes are broadly categorized into following four categories. Weighted Codes Non-Weighted Codes Binary Coded Decimal Code Alphanumeric Codes Error Detecting Codes Error Correcting Codes
1.2.2.1 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.
1.2.2.2 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 . i) 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.
1.2.2.2 Non-Weighted Codes : Excess-3 code The excess-3 codes are obtained as follows − Example:
1.2.2.2 Non-Weighted Codes : Gray Code ii) Gray Code (or Reflected Binary 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.
1.2.2.2 Non-Weighted Codes : Gray Code … Application of Gray code: Gray code is popularly used in the shaft position encoders . A shaft position encoder produces a code word which represents the angular position of the shaft.
1.2.2.3 Binary Coded Decimal (BCD) code In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to express each of the decimal digits with a binary code. In the BCD, with four bits we can represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to 1001). The remaining six code combinations i.e . 1010 to 1111 are invalid in BCD .
1.2.2.3 Binary Coded Decimal (BCD) code … Advantages of BCD Codes: It is very similar to decimal system . We need to remember binary equivalent of decimal numbers 0 to 9 only. Disadvantages of BCD Codes: The addition and subtraction of BCD have different rules. The BCD arithmetic is little more complicated. BCD needs more number of bits than binary to represent the decimal number. So BCD is less efficient than binary.
1.2.2.4 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 .
1.2.2.4 Alphanumeric codes … The following three alphanumeric codes are very commonly used for the data representation. ASCII : American Standard Code for Information Interchange (7 Bit). EBCDIC : Extended Binary Coded Decimal Interchange Code (8 Bit). UNICODE Baudot (or Baudot -Murray) Code (5 Bit) . ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more commonly used worldwide while EBCDIC is used primarily in large IBM computers.
1.2.2.4 Alphanumeric codes : ASCII The full form of ASCII code is American Standard Code for Information Interchange . It is a 7- bit code based on the English alphabet. In 1967 this code was first published and since then it is being modified and updated. ASCII code has 128 characters some of which are enlisted below to get familiar with the code.
1.2.2.4 Alphanumeric codes : ASCII DEC OCT HEX BIN Symbol Description 000 00 00000000 NUL Null char 1 001 01 00000001 SOH Start of Heading 2 002 02 00000010 STX Start of Text 3 003 03 00000011 ETX End of Text 4 004 04 00000100 EOT End of Transmission 5 005 05 00000101 ENQ Enquiry 6 006 06 00000110 ACK Acknowledgment 7 007 07 00000111 BEL Bell 8 010 08 00001000 BS Back Space 9 011 09 00001001 HT Horizontal Tab 10 012 0A 00001010 LF Line Feed 11 013 0B 00001011 VT Vertical Tab 12 014 0C 00001100 FF Form Feed 13 015 0D 00001101 CR Carriage Return 14 016 0E 00001110 SO Shift Out / X-On 15 017 0F 00001111 SI Shift In / X-O
1.2.2.4 Alphanumeric codes : ASCII
1.2.2.4 Alphanumeric codes : ASCII
1.2.2.4 Alphanumeric codes : EBCDIC The EBCDIC stands for Extended Binary Coded Decimal Interchange Code . IBM invented this code to extend the Binary Coded Decimal which existed at that time. All the IBM computers and peripherals use this code. It is an 8 bit code and therefore can accommodate 256 characters . Below is given some characters of EBCDIC code to get familiar with it .
1.2.2.4 Alphanumeric codes : EBCDIC Char EBCDIC HEX Char EBCDIC HEX Char EBCDIC HEX A 1100 0001 C1 P 1101 0111 D7 4 1111 0100 F4 B 1100 0010 C2 Q 1101 1000 D8 5 1111 0101 F5 C 1100 0011 C3 R 1101 1001 D9 6 1111 0110 F6 D 1100 0100 C4 S 1110 0010 E2 7 1111 0111 F7 E 1100 0101 C5 T 1110 0011 E3 8 1111 1000 F8 F 1100 0110 C6 U 1110 0100 E4 9 1111 1001 F9 G 1100 0111 C7 V 1110 0101 E5 blank ... ... H 1100 1000 C8 W 1110 0110 E6 . ... ... I 1100 1001 C9 X 1110 0111 E7 ( ... ... J 1101 0001 D1 Y 1110 1000 E8 + ... ... K 1101 0010 D2 Z 1110 1001 E9 $ ... ... L 1101 0011 D3 1111 0000 F0 * ... ... M 1101 0100 D4 1 1111 0001 F1 ) ... ... N 1101 0101 D5 2 1111 0010 F2 - ... ... O 1101 0110 D6 3 1111 0011 F3 /
1.2.2.4 Alphanumeric codes : EBCDIC
1.2.2.4 Alphanumeric codes : UNICODE Unicode is the newest concept in digital coding. In Unicode every number has a unique character. Leading technological giants have adopted this code for its uniqueness. A part of the Unicode table is given below.
1.2.2.4 Alphanumeric codes : Baudot -Murray code In digital telegraphy ( teleprinter , telex) a standard 5-bit code is commonly used to represent a character (letter, number or punctuation mark ). Although this code is generally known as the Baudot code, this name is actually wrong. The official name for the latest telegraphy standard is ITA2 (International Telegraph Alphabet No 2). It was superceeded by ASCII in 1963, but is still used by amateurs today. The most common ' Baudot ' code is also known as Murray code, or as Baudot -Murray code. The ITA2 standard is used widely with historical cipher machines.
1.2.2.4 Alphanumeric codes : Baudot -Murray code ITA2 Standard: Normal text consists of over 50 different characters (26 letters, 10 numbers, 10 punctuation marks and some control codes). In the ITA2 standard, 5 bits are used to represent a character, which means that we can create only 32 different codes (25). As this would not be sufficient to create normal text, most codes are used twice (i.e. have two different meanings) and special codes are used to 'shift' between the two code sets known as Letters (LTRS) and Figures (FIGS). The table below shows the interpretation of the commonly used ITA2 standard . Although this code has officially been superseded by ASCII, it is still in use on some old telex networks and by Radio Amateurs. Some of the cipher machines described on this website, use 5-bit digital telegraphy and many of these (if they support the Latin character set) follow the ITA2 standard.
1.2.2.4 Alphanumeric codes : Baudot -Murray code LTRS-shift is represented by 111·11 (5 holes), so that it can be used to wipe part of a paper tape, without affecting the rest. Normally , a paper tape would start with two LTRS characters, to ensure that the teletype is in Letters-mode. By convention, the holes (bits) in the tape are called channels or tracks and the tape is shown as it would run through the reader away from you.
1.2.2.4 Alphanumeric codes : Baudot -Murray code Ltr Letters (A-Z) Fig Figures (Numbers and punctuation marks) Ctrl Control characters Hex Hexadecimal code Bin 1 Binary, Positions of the holes in the paper tape Ltr Fig Hex Bin NUL 00 000·00 NULL, Nothing (blank tape) 1 E 3 01 000·01 2 LF 02 000·10 Line Feed (new line) 3 A - 03 000·11 4 SP 04 001·00 Space 5 S ' 05 001·01 6 I 8 06 001·10 7 U 7 07 001·11 8 CR 08 010·00 Cariage Return 9 D ENC 09 010·01 Enquiry (Who are you?, WRU) 10 R 4 0A 010·10 11 J BEL 0B 010·11 BELL (ring bell at the other end) 12 N , 0C 011·00 13 F ! 0D 011·01 14 C : 0E 011·10 15 K ( 0F 011·11 16 T 5 10 100·00 17 Z + 11 100·01 18 L ) 12 100·10 19 W 2 13 100·11 20 H $ 14 101·00 Currency symbol (can also be £) 21 Y 6 15 101·01 22 P 16 101·10 23 Q 1 17 101·11 24 O 9 18 110·00 25 B ? 19 110·01 26 G & 1A 110·10 Can also be @ 27 FIGS 1B 110·11 Figures (Shift on) 28 M . 1C 111·00 29 X / 1D 111·01 30 V ; 1E 111·10 31 LTRS 1F 11·111 Letters (Shift off)
1.2.2.5 Error Codes What is Error? Error is a condition when the output information does not match with the input information. During transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling from one system to other. That means a 0 bit may change to 1 or a 1 bit may change to 0 .
1.2.2.5 Error Codes … 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.
1.2.2.5 Error Codes … How to Detect and Correct Errors? To detect and correct the errors, additional bits are added to the data bits at the time of transmission. The additional bits are called parity bits . They allow detection or correction of the errors. The data bits along with the parity bits form a code word.
1.2.2.5 Error Codes … Parity Checking of Error Detection: It is the simplest technique for detecting and correcting errors. The MSB of an 8-bits word is used as the parity bit and the remaining 7 bits are used as data or message bits. The parity of 8-bits transmitted word can be either even parity or odd parity . 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,....).
1.2.2.5 Error Codes … Use of Parity Bit: The parity bit can be set to 0 and 1 depending on the type of the parity required. For even parity, this bit is set to 1 or 0 such that the no. of "1 bits" in the entire word is even. Shown in fig. (a). For odd parity, this bit is set to 1 or 0 such that the no. of "1 bits" in the entire word is odd. Shown in fig. (b).
1.2.2.5 Error Codes … How Does Error Detection Take Place? Parity checking at the receiver can detect the presence of an error if the parity of the receiver signal is different from the expected parity. That means, if it is known that the parity of the transmitted signal is always going to be "even" and if the received signal has an odd parity, then the receiver can conclude that the received signal is not correct. If an error is detected, then the receiver will ignore the received byte and request for retransmission of the same byte to the transmitter .
1.3 Boolean Algebra Boolean Algebra is used to analyze and simplify the digital (logic) circuits. It uses only the binary numbers i.e. 0 and 1. It is also called as Binary Algebra or logical Algebra . Boolean algebra was invented by George Boole in 1854.
1.3.1 Rule in Boolean Algebra Following are the important rules used in Boolean algebra. Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW. Complement of a variable is represented by an overbar (-). Thus , complement of variable B is represented as . . Thus if B = 0 then = 1 and B = 1 then = 0. ORing of the variables is represented by a plus (+) sign between them. For example ORing of A, B, C is represented as A + B + C. Logical ANDing of the two or more variable is represented by writing a dot between them such as A.B.C. Sometime the dot may be omitted like ABC.
1.3.2 Boolean Laws There are six types of Boolean Laws. Commutative law Associative law Distributive law AND law OR law INVERSION law
1.3.2 Boolean Laws … 1) Commutative law Any binary operation which satisfies the following expression is referred to as commutative operation. Commutative law states that changing the sequence of the variables does not have any effect on the output of a logic circuit. 2) Associative law This law states that the order in which the logic operations are performed is irrelevant as their effect is the same .
1.3.2 Boolean Laws … 3) Distributive law Distributive law states the following condition. 4) AND law These laws use the AND operation. Therefore they are called as AND laws. 5) OR law These laws use the OR operation. Therefore they are called as OR laws. 6) INVERSION law This law uses the NOT operation. The inversion law states that double inversion of a variable results in the original variable itself.
1.3.3 Boolean Expression ⁄ Function Boolean algebra deals with binary variables and logic operation. A Boolean Function is described by an algebraic expression called Boolean expression which consists of binary variables, the constants 0 and 1, and the logic operation symbols. Consider the following example. Here the left side of the equation represents the output Y. So we can state equation no. 1
1.3.3 Boolean Expression ⁄ Function … Truth Table Formation : A truth table represents a table having all combinations of inputs and their corresponding result. It is possible to convert the switching equation into a truth table. For example, consider the following switching equation. The output will be high (1) if A = 1 or BC = 1 or both are 1. The truth table for this equation is shown by Table (a). The number of rows in the truth table is 2n where n is the number of input variables (n=3 for the given equation). Hence there are 2 3 = 8 possible input combination of inputs.
1.3.3 Boolean Expression ⁄ Function … Methods to simplify the Boolean function: The methods used for simplifying the Boolean function are as follows − Karnaugh -map or K-map, and NAND gate method. 1) Karnaugh -map or K-map The Boolean theorems and the De-Morgan's theorems are useful in manipulating the logic expression. We can realize the logical expression using gates. The number of logic gates required for the realization of a logical expression should be reduced to a minimum possible value by K-map method. This method can be done in two different ways, as discussed below.
1.3.3 Boolean Expression ⁄ Function … Karnaugh -map or K-map a) Sum of Products (SOP) Form: It is in the form of sum of three terms AB, AC, BC with each individual term is a product of two variables. Say A.B or A.C etc. Therefore such expressions are known as expression in SOP form. The sum and products in SOP form are not the actual additions or multiplications. In fact they are the OR and AND functions. In SOP form, 0 represents a bar and 1 represents an unbar. SOP form is represented by . Given below is an example of SOP.
1.3.3 Boolean Expression ⁄ Function … Karnaugh -map or K-map b) Product of Sums (POS) Form: It is in the form of product of three terms (A+B), (B+C), or (A+C) with each term is in the form of a sum of two variables. Such expressions are said to be in the product of sums (POS) form. In POS form, 0 represents an unbar and 1 represents a bar. POS form is represented by . Given below is an example of POS.
1.3.3 Boolean Expression ⁄ Function 2) NAND gates Realization: NAND gates can be used to simplify Boolean functions as shown in the example below.
1.3.4 De Morgan's Theorems De Morgan has suggested two theorems which are extremely useful in Boolean Algebra. The two theorems are discussed below. Theorem 1: The left hand side (LHS) of this theorem represents a NAND gate with inputs A and B, whereas the right hand side (RHS) of the theorem represents an OR gate with inverted inputs. This OR gate is called as Bubbled OR.
1.3.4 De Morgan's Theorems … Theorem 1: Table showing verification of the De Morgan's first theorem -
1.3.4 De Morgan's Theorems Theorem 2: The LHS of this theorem represents a NOR gate with inputs A and B, whereas the RHS represents an AND gate with inverted inputs. This AND gate is called as Bubbled AND .
1.3.4 De Morgan's Theorems … Theorem 2: Table showing verification of the De Morgan's second theorem-