Introduction To Comp24 - L3
Introduction To Comp24 - L3
Engineering department
2024
Introduction to Numbering system
•Program is a set of instructions
•Computer works by machine language,
•Instructions has operation code and operand data 0 and 1 only
•Data o, 1 hence by numbering system change decimal to 0,1
Numbering Systems
Numbering Systems
1. Decimal Numbering System
2. Binary Numbering System
3. Octal Number System
4. Hexadecimal Numbering System
Number System Conversion
1. Decimal to Binary
2. Decimal to Octal
3. Decimal to Hexadecimal
4. Binary to Hexadecimal
Data flow Numbering system
• Decimal number human calculation (0, 1, 2, 3, 4, 5, 6, 7, 8,
9) with base 10. values are taking 10 to power 10N. (X0=1)
• 48 =(4* 101) +(8* 100) → X=∑(di*10N)
• Binary number known as base 2 use 2 digits 0 and 1.
• Values calculated by taking base 2 to power 2N.
• Number binary 1002 =(1 * 22)+(0 * 21) +(0 * 20)=410
• Converting From Decimal to Binary by successive
divisions by 2, placing remainder of 0 or 1 from right to left
Decimal Binary Hexadecimal Address Memory Contents
0 0 0
1 1 1 00 10 05
2 10 2 01 24 06
3 11 3 02 23 07
Convert
4 100 4
to 03 11 08
5 101 5
hex
6 110 6 04 FF 06
7 111 7 05 00 08
8 1000 8
9 1001 9 06 00 18
10 1010 A 07 00 3A
11 1011 B 08 00 3C
12 1100 C
13 1101 D
14 1110 E
15 1111 F
American Standard Code
Information interchange 7-
bits A=41
Subtract 42 from 53
Y=53-42
Number 53 =00110101
Number 42 =00101010
Reverse the bits of 42 =11010101
Add 1 1
Number -42 = 11010110
53+(-42)=11 =00001011
Subtraction 41-20=
invert 4110 1010012
invert -2010 - 0101002
1 complement of -101011
2 complement+12 +1011002
1010012 4110
+ 1011002 + (-20)10
x010101 2110