a. Convert \(2AE_{16}\) to binary
To convert Hexadecimal to Binary, represent each hex digit as a 4-bit binary equivalent:
Combine the bits:
\[ 0010 \quad 1010 \quad 1110 \]
Answer: \(1010101110_2\)
b. Using two's complement add \(-23\) to \(+5\) using 8-bit system
Step 1: Convert \(+23\) to 8-bit binary
\(23 = 16 + 4 + 2 + 1 \rightarrow 00010111\)
Step 2: Find two's complement of \(23\) (to get \(-23\))
Invert bits: \(11101000\)
Add 1: \(11101000 + 1 = 11101001\)
\(-23 = 11101001\)
Step 3: Convert \(+5\) to 8-bit binary
\(+5 = 00000101\)
Step 4: Add \(-23\) and \(+5\)
Answer: \(11101110_2\)
c. Add \(21\) to \(50\) in 8-bit system
Step 1: Convert to binary
\(21 = 00010101\)
\(50 = 00110010\)
Step 2: Perform binary addition
Answer: \(01000111_2\)
d. Convert \(234_{10}\) to octal
Perform repeated division by 8:
| Division | Quotient | Remainder |
|---|---|---|
| \(234 \div 8\) | \(29\) | 2 |
| \(29 \div 8\) | \(3\) | 5 |
| \(3 \div 8\) | \(0\) | 3 |
Read remainders from bottom to top: \(352\)
Answer: \(352_8\)
e. What are the ranges of 8-bit, 16-bit, 32-bit and 64-bit integer?
a. Calculate \(24 - 99\) in binary with two's complement of 8-bit
Step 1: Convert \(24\) to 8-bit binary: \(00011000\)
Step 2: Convert \(-99\) to 8-bit binary
\(+99 = 01100011\)
Invert: \(10011100\)
Add 1: \(10011101\)
Step 3: Add \(24 + (-99)\)
Answer: \(10110101_2\)
b. What is the value of \(11101\) in octal?
Group bits in threes from right to left (pad with zero): \(011 \quad 101\)
Answer: \(35_8\)
c. In an 8-bit system, add \(120\) to \(55\)
Step 1: Convert to binary: \(120 \rightarrow 01111000\), \(55 \rightarrow 00110111\)
Step 2: Add
Answer: \(10101111_2\)
d. Convert \(720_8\) to hexadecimal
Step 1: Octal to Binary: \(7(111)\), \(2(010)\), \(0(000) \rightarrow 111010000\)
Step 2: Binary to Hex: Group by 4s: \(0001 \quad 1101 \quad 0000\)
\(1 \rightarrow 1\), \(1101 \rightarrow D\), \(0000 \rightarrow 0\)
Answer: \(1D0_{16}\)
e. Value of various numbers in 8-bit sign-magnitude
| Decimal | Sign-Magnitude (8-bit) |
|---|---|
| +88 | 01011000 |
| -88 | 11011000 |
| -1 | 10000001 |
| 0 | 00000000 |
| +1 | 00000001 |
| -127 | 11111111 |
| +127 | 01111111 |
a. Using one's complement, add \(-32\) to \(+15\) in an 8-bit system
Step 1: \(+32 = 00100000\). One's Complement of \(-32 = 11011111\).
Step 2: Add
Answer: \(11101110_2\)
b. Calculate \(28+6\) using one's complement in an 8-bit system
Step 1: \(28 \rightarrow 00011100\), \(6 \rightarrow 00000110\)
Step 2: Add
Answer: \(00100010_2\)
c. Value of various numbers in 8-bit 1's complement
| Decimal | One's Complement (8-bit) |
|---|---|
| +88 | 01011000 |
| -88 | 10100111 (Invert of +88) |
| -1 | 11111110 (Invert of +1) |
| 0 | 00000000 (+0) or 11111111 (-0) |
| +1 | 00000001 |
| -127 | 10000000 (Invert of +127) |
| +127 | 01111111 |
d. What is the value of \(11101\) in octal?
Group by 3: \(011 \quad 101 \rightarrow 3 \quad 5\)
Answer: \(35_8\)
e. What is the binary value of \(68_{10}\)?
Powers of 2: \(68 = 64 + 4\)
Answer: \(1000100_2\)