Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Prepared by:
Engr.Abdul Kadar Muhammad Masum Lecturer in IT
Department of Business Administration International Islamic University Chittagong (Dhaka Campus) Cell: 01911024003, Email: akmmasum@yahoo.com
Number System:
In mathematics, a Number System is a set of numbers together with one or more operations, such as addition or multiplication. In computer literacy: Binary Number system, Decimal Number System, Octal Number System, Hexadecimal Number System are most prominent.
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 2
Name Binary Number system Decimal Number System Octal Number System Hexadecimal Number System
Base 2 10 8 16
Binary Numbers
A single bit can represent two possible states, like a light bulb that is either on (1) or off (0) Combinations of bits are used to store values
Bit Combinations
1 bit 0 1 2 bits 00 01 10 11 3 bits 000 001 010 011 100 101 110 111 4 bits 0000 1000 0001 1001 0010 1010 0011 1011 0100 1100 0101 1101 0110 1110 0111 1111
1 0 1
1 0
1 0 1
0 1 0 1 1
7
Binary to Decimal: 11101102 = ? 1110110 = 1*26 +1*25 +1*24 +0*23 +1*22 +1*21 +0*20 = 64+ 32+16+0+4+2+0 =11810
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC
11
Reading the sequence of remainders from the bottom up gives the hexa Decimal number is 73D516
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 12
13
Reading the sequence of remainders from the bottom up gives the Octal numeral 7038
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 14
Say we have convert Octal number to Binary system. First: We will convert the octal number into Decimal number Second: We will convert the Decimal number into Binary number
15
Binary Addition:
Here 0+00 0+11 1+01 1 + 1 0, carry 1 Adding two "1" digits produces a digit "0", while 1 will have to be added to the next column. This is similar to what happens in decimal : 5 + 5 0, carry 1 (since 5 + 5 = 0 + 1 10) 7 + 9 6, carry 1 (since 7 + 9 = 6 + 1 10) This is known as carrying. Carrying works the same way in binary
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 16
Binary Addition:
(carried digits)
17
Binary Subtraction:
Subtraction works in much the same way: 000 0 1 1, borrow 1 101 110 Subtracting a "1" digit from a "0" digit produces the digit "1", while 1 will have to be subtracted from the next column. This is known as borrowing.
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 18
Binary Subtraction:
* *** 1101110 10111 ---------------= 1010111 ** * ** 1001100 10011 ---------------= 111001
(starred columns are borrowed from)
19
Binary Multiplication:
20
Binary Multiplication:
21
ASCII:
Information Interchange.
Each ASCII character is represented by 7 bits. The standard ASCII character set consists of 128 decimal numbers ranging from zero through 127 assigned to letters, numbers, punctuation marks, and the most common special characters. For Example: the Character A has the ASCII value 65. The binary equivalent of 65 is 1000001.
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 22
ASCII: (cont.)
One additional bit is needed to indicate whether the value is negative or positive. If the value is positive the additional bit is 0, otherwise it is 1. Hence the memory representation of the Character A will be as follows: A=65=1000001
23
ASCII: (cont.)
Any Character or digit we press from the keyboard is : Firstly, converted to a unique value (called ASCII value). Secondly, The computer then converts this value into its equivalent binary code and store in the memory.
24
Thus, the BCD encoding for the number 127 would be: 0001 0010 0111
25
Alphanumeric Code:
In computing, an alphanumeric code is a series of letters and numbers which are written in a form that can be processed by a computer. In Alphanumeric character have meaning: "a"-"z", "A"-"Z", "0"-"9". No special characters are included. In computing terminology, a character stored in alphanumeric form is considerably smaller than storing a 8-bit ASCII character, as each character is only 6 bits in length
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 26
Logic gate:
Logic gates are electronic circuit, which operates on one or more inputs signal to produce an output signal.
x+y (x+y) y
y
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC 27
OR Gate An OR gate has more than one input and one output. Its output is 1 , if any of its inputs is 1, otherwise 0. Ideal output, Z=X+Y, where + denotes OR operation. Gate truth table:
x
Gate symbol
y 0 1 0 1
z=x+y 0 1 1 1
29
0 0 1
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC
x y
x y
AND Gate An AND gate has more than one input and one output. Its output is 1 , if all of its inputs are 1, otherwise 0. Ideal output, Z=X.Y, where . denotes AND operation.
Gate truth table:
x
Gate symbol
y 0 1 0 1
z=x.y 0 0 0 1
30
0 0 1
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC
NOT Gate: A NOT gate has one input and one output. Sometimes called an inverter. Here output Y= , where - indicates NOT operation.
Gate truth table: Gate symbol
x 0 1
Engr.Abdul Kadar Md. Masum, Lecturer in IT, DBA, IIUC
x 1 0
31
NAND Gate:
A NAND gate has same effect as an AND gate follow by NOT gate. Hence the output will be opposite of the AND gate. Ideal output, where . denotes AND operation and denotes the NOT operation.
A
Gate Symbol Gate Truth table
0 1 0 1
1 1 1 0
32
NOR Gate: A NOR gate has same effect as an OR gate follow by NOT gate. Hence the output will be opposite of the OR gate. Ideal output, where + denotes OR operation and denotes the NOT operation. Gate Truth table
A
Gate Symbol
0 1 0 1
1 0 0 0
33
XOR Gate: An EXOR gate is widely used in digital circuits. XOR is not a primary or basic gate. Here output , where denotes XOR gate.
Gate Truth table
A
Gate Symbol
0 0 1 1
0 1 0 1
0 1 1 0
34
XNOR Gate:
Here output Q = A B, where denotes XOR gate.
Gate Truth table
Q = AB
Gate Symbol
Q = AB
0 0 1 1
0 1 0 1
1 0 0 1
35
Summary
Summary for all 2-input gates Inputs A B AND NAND Output of each gate OR NOR XOR XNOR
0 0 1 1
0 1 0 1
0 0 0 1
1 1 1 0
0 1 1 1
1 0 0 0
0 1 1 0
1 0 0 1
36
37