assignment -1 with answer
assignment -1 with answer
Decimal to Binary
• 5 ÷ 2 = 2 remainder 1
• 2 ÷ 2 = 1 remainder 0
• 1 ÷ 2 = 0 remainder 1
• Binary of 5: 101
Final Binary:
• 10 ÷ 2 = 5 remainder 0
• 5 ÷ 2 = 2 remainder 1
• 2 ÷ 2 = 1 remainder 0
• 1 ÷ 2 = 0 remainder 1
• Binary of 10: 1010
Final Binary:
• 7 ÷ 2 = 3 remainder 1
• 3 ÷ 2 = 1 remainder 1
• 1 ÷ 2 = 0 remainder 1
• Binary of 7: 111
Final Binary:
• 3 ÷ 2 = 1 remainder 1
• 1 ÷ 2 = 0 remainder 1
• Binary of 3: 11
Final Binary:
• 12 ÷ 2 = 6 remainder 0
• 6 ÷ 2 = 3 remainder 0
• 3 ÷ 2 = 1 remainder 1
• 1 ÷ 2 = 0 remainder 1
• Binary of 12: 1100
Fractional Part (0.875):
Final Binary:
6. Decimal 10 → Binary
• Step 1: 10 ÷ 2 = 5 remainder 0
• Step 2: 5 ÷ 2 = 2 remainder 1
• Step 3: 2 ÷ 2 = 1 remainder 0
• Step 4: 1 ÷ 2 = 0 remainder 1
• Binary: 1010
7. Decimal 45 → Binary
• Step 1: 45 ÷ 2 = 22 remainder 1
• Step 2: 22 ÷ 2 = 11 remainder 0
• Step 3: 11 ÷ 2 = 5 remainder 1
• Step 4: 5 ÷ 2 = 2 remainder 1
• Step 5: 2 ÷ 2 = 1 remainder 0
• Step 6: 1 ÷ 2 = 0 remainder 1
• Binary: 101101
2.Decimal to Octal
1. Decimal 23.375 → Octal
• 23 ÷ 8 = 2 remainder 7
• 2 ÷ 8 = 0 remainder 2
• Octal of 23: 27
Final Octal:
• 10 ÷ 8 = 1 remainder 2
• 1 ÷ 8 = 0 remainder 1
• Octal of 10: 12
Final Octal:
• 7 ÷ 8 = 0 remainder 7
• Octal of 7: 7
Final Octal:
• 5 ÷ 8 = 0 remainder 5
• Octal of 5: 5
Final Octal:
Final Octal:
1. Decimal 64 → Octal
• 64 ÷ 8 = 8 remainder 0
• 8 ÷ 8 = 1 remainder 0
• 1 ÷ 8 = 0 remainder 1
• 125 ÷ 8 = 15 remainder 5
• 15 ÷ 8 = 1 remainder 7
• 1 ÷ 8 = 0 remainder 1
• 200 ÷ 8 = 25 remainder 0
• 25 ÷ 8 = 3 remainder 1
• 3 ÷ 8 = 0 remainder 3
• 512 ÷ 8 = 64 remainder 0
• 64 ÷ 8 = 8 remainder 0
• 8 ÷ 8 = 1 remainder 0
• 1 ÷ 8 = 0 remainder 1
5. Decimal 77 → Octal
• 77 ÷ 8 = 9 remainder 5
• 9 ÷ 8 = 1 remainder 1
• 1 ÷ 8 = 0 remainder 1
3.Decimal to Hexadecimal
• 7 ÷ 16 = 0 remainder 7
• Hexadecimal of 123: 7B
• Hexadecimal of 255: FF
• 512 ÷ 16 = 32 remainder 0
• 32 ÷ 16 = 2 remainder 0
• 2 ÷ 16 = 0 remainder 2
• 1000 ÷ 16 = 62 remainder 8
• 62 ÷ 16 = 3 remainder 14 → Hex digit for 14 = E
• 3 ÷ 16 = 0 remainder 3
• 256 ÷ 16 = 16 remainder 0
• 16 ÷ 16 = 1 remainder 0
• 1 ÷ 16 = 0 remainder 1
• 1 ÷ 16 = 0 remainder 1
Final Hexadecimal:
• 983 ÷ 16 = 61 remainder 7
• 3 ÷ 16 = 0 remainder 3
• Hexadecimal of 15732: 3D74
• Hexadecimal of 0.8125: .D
Final Hexadecimal:
• 512 ÷ 16 = 32 remainder 0
• 32 ÷ 16 = 2 remainder 0
• 2 ÷ 16 = 0 remainder 2
• Hexadecimal of 0.6875: .B
Final Hexadecimal:
4.Hexadecimal to Decimal
Hexadecimal to Decimal (Normal Integer Examples)
5.octal to decimal
6.Binary to Decimal
7.convert octal to hexadecimal
8.convert hexadecimal to octal