Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

CS Conversion Notes

Uploaded by

Hein Thant Aung
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

CS Conversion Notes

Uploaded by

Hein Thant Aung
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CS Conversion notes

Wednesday, July 5, 2023 8:35 PM

Binary ---> Denary ► Subtraction


This method subtracts the given number with the less
Binary is a base 2 number system binary number (2 powers number ex: 2, 4, 8) till it reached
0.
128 64 32 16 8 4 2 1
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 Ex: 49
First we will have to know our 2 powers
To covert to Denary 128 64 32 16 8 4 2 1
Denary has a base 10 number system which allow humans to
understand. Subtract the number that are lower than 152
152 - 128 = 24
• Two methods 24 - 16 = 8 24 is less than 64 and 32 so we use 16
► Division [assumed to be easier]
16 - 8 = 8
This method divides the given number with 2 until it has reached 0.
8 - 8 = 0 If numbers were equal, allowed to subtract
Ex: 49 By dividing 49 with 2
2 | 49 It leaves a reminder 1 From there put 1 in the number we had used and 0 which
2 | 24 R -> 1 ^ It continues to divide till it was 2 x 0 weren't
2 | 12 R -> 0 | The answer is written down to upwards 128 64 32 16 8 4 2 1
2 | 6 R -> 0 | 49 = 0 1 1 0 0 0 1 (7 bits) 1 0 0 1 1 0 0 0
2 | 3 R -> 0 | 152 = 10011000
2 | 1 R -> 1 | To note:
0 R -> 1 | Bits usually represent in 8 bits numbers
--------------> added extra --->0 0 1 1 0 0 0 1 (8 bits)

Denary ----> Binary


Binary Adding
To add binary numbers: To convert you will need 2 powers number to add 1s that were used.
• 0+1=1 1 = on 0 = off
• 1 + 1 = 1 0 [ 2^1 = 2 in binary 1 0] 2 powers --> 128 64 32 16 8 4 2 1
• 1 + 1 + 1 = 1 1 1 [in binary 1 1 = 3]
Ex: 0 1 1 1 1 0 0 1

128 64 32 16 8 4 2 1
Ex: 0 1 1 1 1 0 0 1
1 1 1 1 <carry numbers
1 0 0 1 1 0 1 0 1) Write down the 2 powers numbers
+1 1 0 1 0 1 1 1 2) Add numbers which were put to one.
1 0 1 1 1 0 0 0 1 <answer 64 + 32 + 16+ 8 + 1 = 121
^over flow
0 1 1 1 1 0 0 1 = 121

Binary ---> Hexadecimal


Hexadecimal is base 16 number system that makes binary number shorter and easier
to read.
It goes 0 1 2 3 4 5 6 7 8 9 A B C D E F {in total of 16 number usage}
A = 10 B = 11 C = 12 D = 13 E = 14 F = 15

Ex: 1 1 1 0 0 1 1 0
To convert hexa you will need to put the binary number in a group of 4
1 1 1 0 = 15 [ E ]
0110= 6
1) Just like in denary you will switch binary to denary number
2) It will be re-written in order
1110/0110
E 6
11100110=E6

CS Page 1

You might also like