Unit of Data and Number System
Unit of Data and Number System
BIT (b)
Smallest unit of data is Bit. Represented by small b.
A bit can contain either 0 or 1.
Example of a 4 bit binary- 0101.
Number of combination or Set of characters N = 2n ; Where n= Bit number. For
an example a 8 bit system can have maximum 256 bit-combinations or set of
characters.
In Character encoding every combination represents a decimal code point which
have a type Character mapped. Code point of A is 65 and in Binary 1000001.
BYTE (B)
A Byte is comprises of 8-bits . Represented by Capital B. i.e~ 1Byte = 8 Bit.
A byte represents a single Typed Character in ASCII System.
1 KB = 1024 Byte 1 MB = 1024 KB 1 GB = 1024 TB 1TB = 1024 PB 1 PB =
1024 EB 1EB = 1024 ZB 1ZB = 1024 YB
1 Kb = 1024 Byte 1 Mb = 1024 Kb 1 Gb = 1024 Tb 1Tb = 1024 Pb 1 Pb =
1024 Eb 1Eb = 1024 Zb 1 Zb = 1024 Yb
[ KM-GT-PE-ZY ]
NUMBER SYSTEM
Four Types of number system are there -----
Decimal.
Hexadecimal.
Octal.
Binary.
Decimal
Base – 10.
10 digits are there. Zero to Nine.
Hexadecimal
Base – 16.
4 Power of 2. 24
16 digits are there. Zero to Nine & A to F.
Octal
Base – 8.
3 Power of 2. 23
8 digits are there. Zero to Seven.
Binary
Base – 2.
1 Power of 2. 21
2 digits are there. Zero & One.
CONVERTION BETWEEN HEXADECIMAL; OCTAL AND BINARY
→ Hexadecimal Means Base is 16 and Power is 4. So, Set of Binary will contain 4 bits.
→ Number of Columns will be Base / 2 until one comes. And Number of row will be Base.
→ Left side of Decimal point add zero to the Left side to make set and right hand side will
add zero to right most side.
0 0 0 0
0 0 1 1
0 1 0 2 → Convert (10010101.110110)2 =(?)16 & (?)8
0 1 1 3 Make Set of 4-bit :- 1001 0101.1101 1000
1 0 0 4 Decode:- (95.D8)16
1 0 1 5
Make Set of 3-bit :- 010 010 101.110 110
1 1 0 6
Decode:- (225.66)8
1 1 1 7
4-set 2-set 1-set OC
CONVERTING DECIMAL AND BINARY
TAL
→ Divide a decimal number by 2 if from binary, by 8 if from octal by 16 if from hex; Until
reminder is 1.
→ Write reminders from bottom to top.
→ For point decimal number Multiply with 2/8/16 until decimal part become Zero. Write
integer part from top.
→ From Binary Multiply 0 0 0 0 0 with 2n/8n/16n from right
hand side and add them 0 0 0 1 1 all together.
0 0 1 0 2
→ For point binary 0 0 1 1 3 numbers Multiply with 2-
n
/8-n/16-n from Left hand 0 1 0 0 4 side and sum up all
together. 0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
Convert 1 0 0 0 8 (10010101.110110)2 =(?)10
= 1 0 0 1 9
1.27+0.26+0.25+1.24+0 1 0 1 0 A .23+1.22+0.21+1.20 . 1.2-
1
+1.2-2+0.2-3+1.2-4+1.2- 1 0 1 1 B 5
+0.2-6
1 1 0 0 C
1 1 0 1 D
1 1 1 0 E
1 1 1 1 F
8- 4- 2- 1- Hexadecimal
set se set set
t
= [128+ 16+4 +1] . [0.5 + 0.25 + 0.0625 + 0.03125]
= 149.84375