

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
dl unit 1 notes is included in the above document and can be accessed by all.
Typology: Lecture notes
1 / 41
This page cannot be seen from the preview
Don't miss anything!
The ASCII stands for American Standard Code for Information Interchange. The ASCII code is an alphanumeric code used for data communication in digital computers. The ASCII is a 7-bit code capable of representing 2^7 or 128 number of different characters. The ASCII code is made up of a three-bit group, which is followed by a four-bit code.
code from 20h to 7Fh is used for graphic symbols.
The ASCII characters are classified into the following groups:
The non-printable characters used for sending commands to the PC or printer are known as control characters. We can set tabs, and line breaks functionality by this code. The control characters are based on telex technology. Nowadays, it's not so much popular in use. The character from 0 to 31 and 127 comes under control characters.
All printable characters that are neither numbers nor letters come under the special characters. These characters contain technical, punctuation, and mathematical characters with space also. The character from 32 to 47, 58 to 64, 91 to 96, and 123 to 126 comes under this category. Total no of special characters =16+7+10=
This category of ASCII code contains ten Arabic numerals from 0 to 9.
In this category, two groups of letters are contained, i.e., the group of uppercase letters and the group of lowercase letters. The range from 65 to 90 and 97 to 122 comes under this category. NUMBER SYSTEM : DECIMAL SYSTEM: representing number using digit 0 to 9 =10 symbols (10) BINARY SYSTEM: representing the number using digits 0 and 1 = 2 symbols (1010) 1 0 1 0 = 8+ 0+ 2+0 = OCTAL SYSTEM : u are representing the number using the digit 0 to 7=8 symbols ( HEXADECIMAL SYSTEM : u are representing number using the digit 0 to 9 and A to F (10+6=16 symbols)
The values are typically represented in ASCII code tables in decimal, binary, and hexadecimal form. Binary Hexadecimal Decimal ASCII Symbol Description Group 0000000 0 0 NUL The null character encourage the device to do nothing Control Character 0000001 1 1 SOH The symbol SOH(Starts of heading) Initiates the header. Control Character 0000010 2 2 STX The symbol STX(Start of Text) ends the header and marks the beginning of a message. Control Character
(Vertical Tab) 0001100 C 12 FF Requests a page break (Form Feed) Control Character 0001101 D 13 CR Moves the cursor back to the first position of the line (Carriage Return) Control Character 0001110 E 14 SO Switches to a special presentation (Shift Out) Control Character 0001111 F 15 SI Switches the display back to the normal state (Shift In) Control Character 0010000 10 16 DLE Changes the meaning of the following characters (Data Link Escape) Control Character 0010001 11 17 DC1 Control characters assigned depending on the device used (Device Control) Control Character 0010010 12 18 DC2 Control characters assigned depending on the device used (Device Control) Control Character 0010011 13 19 DC3 Control characters assigned depending on the device used (Device Control) Control Character 0010100 14 20 DC4 Control characters assigned depending on the device used Control Character
(Device Control) 0010101 15 21 NAK The negative response to a request (Negative Acknowledge) Control Character 0010110 16 22 SYN Synchronizes a data transfer, even if no signals are transmitted (Synchronous Idle) Control Character 0010111 17 23 ETB Marks the end of a transmission block (End of Transmission Block) Control Character 0011000 18 24 CAN Makes it clear that transmission was faulty and the data must be discarded (Cancel) Control Character 0011001 19 25 EM Indicates the end of the storage medium (End of Medium) Control Character 0011010 1A 26 SUB Replacement for a faulty sign (Substitute) Control Character 0011011 1B 27 ESC Initiates an escape sequence and thus gives the following characters a special meaning (Escape) Control Character 0011100 1C 28 FS File separator. Control Character 0011101 1D 29 GS Group separator. Control
0101110 2E 46. Full stop Special Character 0101111 2F 47 / Forward slash Special Character 0110000 30 48 0 Numbers 0110001 31 49 1 Numbers 0110010 32 50 2 Numbers 0110011 33 51 3 Numbers 0110100 34 52 4 Numbers 0110101 35 53 5 Numbers 0110110 36 54 6 Numbers 0110111 37 55 7 Numbers 0111000 38 56 8 Numbers 0111001 39 57 9 Numbers 0111010 3A 58 : Colon Special characters 0111011 3B 59 ; Semicolon Special characters 0111100 3C 60 < Small than bracket Special characters 0111101 3D 61 = Equals sign Special characters 0111110 3E 62 > Bigger than symbol Special characters 0111111 3F 63? Question mark Special characters 1000000 40 64 @ At symbol Special characters 1000001 41 65 A Capital letters 1000010 42 66 B Capital
letters 1000011 43 67 C Capital letters 1000100 44 68 D Capital letters 1000101 45 69 E Capital letters 1000110 46 70 F Capital letters 1000111 47 71 G Capital letters 1001000 48 72 H Capital letters 1001001 49 73 I Capital letters 1001010 4A 74 J Capital letters 1001011 4B 75 K Capital letters 1001100 4C 76 L Capital letters 1001101 4D 77 M Capital letters 1001110 4E 78 N Capital letters 1001111 4F 79 O Capital letters 1010000 50 80 P Capital letters 1010001 51 81 Q Capital letters 1010010 52 82 R Capital letters
1100100 64 100 D Lowercase letters 1100101 65 101 E Lowercase letters 1100110 66 102 F Lowercase letters 1100111 67 103 G Lowercase letters 1101000 68 104 H Lowercase letters 1101001 69 105 I Lowercase letters 1101010 6A 106 J Lowercase letters 1101011 6B 107 K Lowercase letters 1101100 6C 108 L Lowercase letters 1101101 6D 109 M Lowercase letters 1101110 6E 110 N Lowercase letters 1101111 6F 111 O Lowercase letters 1110000 70 112 P Lowercase letters 1110001 71 113 Q Lowercase letters 1110010 72 114 R Lowercase letters 1110011 73 115 S Lowercase letters 1110100 74 116 T Lowercase letters
1110101 75 117 U Lowercase letters 1110110 76 118 v Lowercase letters 1110111 77 119 w Lowercase letters 1111000 78 120 x Lowercase letters 1111001 79 121 y Lowercase letters 1111010 7A 122 z Lowercase letters 1111011 7B 123 { Left curly bracket Special characters 1111100 7C 124 l Vertical line Special characters 1111101 7D 125 } Right curly brackets Special characters 1111110 7E 126 ~ Tilde Special characters 1111111 7F 127 DEL The DEL(Delete) symbol deletes a character. This is a control character that consists of the same number in all positions. Control characters Example 1: (
94 a 118 v 97 a 84 T 112 p 111 o 105 i 110 n 116 t 64 @ 49 1 50 2 51 3 Conversion of Decimal to Hexadecimal a) Converting with Remainders method (For integer part) This is a straightforward method which involves dividing the number to be converted. Let decimal number is N then divide this number from 16 because base of hexadecimal number system is 16. Note down the value of remainder, which will be: 0 to 15 (replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F respectively). Again divide remaining decimal number till it became 0 and note every remainder of every step. Then write remainders from bottom to up (or in reverse order), which will be equivalent hexadecimal number of given decimal number. This is procedure for converting an integer decimal number, algorithm is given below. Take decimal number as dividend. Divide this number by 16 (16 is base of hexadecimal so divisor here). Store the remainder in an array (it will be: 0 to 15 because of divisor 16, replace 10, 11, 12, 13, 14, 15 by A, B, C, D, E, F respectively). Repeat the above two steps until the number is greater than zero. Print the array in reverse order (which will be equivalent hexadecimal number of given decimal number).
Note that dividend (here given decimal number) is the number being divided, the divisor (here base of hexadecimal, i.e., 16) in the number by which the dividend is divided, and quotient (remaining divided decimal number) is the result of the division. Example − Convert decimal number 540 into hexadecimal number. Since given number is decimal integer number, so by using above algorithm performing short division by 16 with remainder. Division Remainder (R) 540 / 16 = 33 12 = C 33 / 16 = 2 1 2 / 16 = 0 2 0 / 16 = 0 0 Now, write remainder from bottom to up (in reverse order), this will be 021C (or only 21C) which is equivalent hexadecimal number of decimal integer 540. Conversion of hexadecimal to decimal : 2 1 c 16 2 16 1 16 0 256 * 2+ 16+12*1=512+16+12= Conversion of Binary to Decimal : The binary equivalent of 10 is 1010 1010 to decimal 1 0 1 0 23 22 21 20 Decimal equivalent of binary no 1010 is : 8+0+2+0=
Boolean Algebra : A set of rules or Laws of Boolean Algebra expressions have been invented to help reduce the number of logic gates needed to perform a particular logic operation resulting in a list of functions or theorems known commonly as the Laws of Boolean Algebra. Boolean Algebra is the mathematics we use to analyse digital gates and circuits. We can use these “Laws of Boolean” to both reduce and simplify a complex Boolean expression in an attempt to reduce the number of logic gates required. Boolean Algebra is therefore a system of mathematics based on logic that has its own set of rules or laws which are used to define and reduce Boolean expressions. It uses only the binary numbers i.e. 0 and 1. It is also called as Binary Algebra or logical Algebra. The variables used in Boolean Algebra only have one of two possible values, a logic “0” and a logic “1” but an expression can have an infinite number of variables all labelled individually to represent inputs to the expression, For example, variables A, B, C etc, giving us a logical expression of A + B = C, but each variable can ONLY be a 0 or a 1. Examples of these individual laws of Boolean, rules and theorems for Boolean Algebra are given in the following table. Truth Tables for the Laws of Boolean Boolean Expression Description^ Equivalent Switching Circuit Boolean Algebra Law or Rule A + 1 = 1 A in parallel with closed=“CLOSED” Annulment A + 0 = A A in parallel with open=“A” Identity A. 1 = A A in series with closed=“A” Identity
A. 0 = 0 A in series with open=“OPEN” Annulment A + A = A A in parallel with A=“A” Idempotent A. A = A A in series with A=“A” Idempotent NOT NOTA=A NOT NOT A (double negative) = “A” Double Negation A in parallel with NOT A=“CLOSED” Complement A in series with NOT A=“OPEN” Complement A+B=B+A A in parallel with B= B in parallel with A Commutative A.B=B.A A in series with B= B in series with A Commutative invert and replace OR with AND de Morgan’s Theorem invert and replace AND with OR de Morgan’s Theorem
However, when dealing with Boolean expressions and especially logic gate truth tables, we do not generally use “ON” or “OFF” but instead give them bit values which represent a logic level “1” or a logic level “0” respectively. Then the four possible combinations of A and B for a 2-input logic gate is given as: Input Combination 1. – “OFF” – “OFF” or ( 0, 0 ) Input Combination 2. – “OFF” – “ON” or ( 0, 1 ) Input Combination 3. – “ON” – “OFF” or ( 1, 0 ) Input Combination 4. – “ON” – “ON” or ( 1, 1 ) Therefore, a 3-input logic circuit would have 8 possible input combinations or 2^3 and a 4-input logic circuit would have 16 or 2^4 , and so on as the number of inputs increases. Then a logic circuit with “n” number of inputs would have 2 n^ possible input combinations of both “OFF” and “ON”. So in order to keep things simple to understand, here we will only deal with standard 2-input type logic gates, but the principals are still the same for gates with more than two inputs. Then the Truth tables for a 2-input AND Gate, a 2-input OR Gate and a single input NOT Gate is given as follows. 2-input AND Gate For a 2-input AND gate, the output Q is true if BOTH input A “AND” input B are both true, giving the Boolean Expression of: ( Q = A and B ). Symbol Truth Table A B Q 0 0 0 0 1 0 1 0 0 1 1 1 Boolean Expression Q = A.B Read as A AND B gives Q Note that the Boolean Expression for a two input AND gate can be written as: A.B or just simply AB without the decimal point. 2-input OR (Inclusive OR) Gate For a 2-input OR gate, the output Q is true if EITHER input A “OR” input B is true, giving the Boolean Expression of: ( Q = A or B ).
Symbol Truth Table A B Q 0 0 0 0 1 1 1 0 1 1 1 1 Boolean Expression Q = A+B Read as A OR B gives Q NOT Gate (Inverter) For a single input NOT gate, the output Q is ONLY true when the input is “NOT” true, the output is the inverse or complement of the input giving the Boolean Expression of: ( Q = NOT A ). Symbol Truth Table A Q 0 1 1 0 Boolean Expression Q = NOT A orA Read as inversion of A gives Q The NAND and the NOR Gates are a combination of the AND and OR Gates respectively with that of a NOT Gate (inverter). 2-input NAND (Not AND) Gate For a 2-input NAND gate, the output Q is NOT true if BOTH input A and input B are true, giving the Boolean Expression of: ( Q = not(A AND B) ). Symbol Truth Table