Here are the solutions to your questions:
-
Differentiate between Pure binary and BCD code as used in data representational. (2 marks)
- Pure Binary: Represents a decimal number as a single binary sequence. It is generally more efficient for storage and arithmetic operations as it uses fewer bits for larger numbers. However, it can be more complex for humans to read and convert directly to decimal.
- BCD (Binary Coded Decimal): Represents each decimal digit by its 4-bit binary equivalent. It simplifies human readability and conversion to/from decimal because each digit is encoded separately. However, it is less efficient in terms of storage (requires more bits than pure binary for the same decimal number) and arithmetic operations are more complex.
-
The magnitude of number is evaluated using 3 parameters. State them. (3 marks)
The three parameters used to evaluate the magnitude of a number are:
- Sign: Indicates whether the number is positive or negative.
- Digits/Bits: The actual numerical values (e.g., 0s and 1s in binary) that form the number.
- Positional Weight: The value assigned to each digit's position based on the number system's base (e.g., powers of 2 for binary, powers of 10 for decimal).
-
Give the following acronyms in full for the following. (3 marks)
a) BCD - Binary Coded Decimal
b) ASCII - American Standard Code for Information Interchange
c) EBCDIC - Extended Binary Coded Decimal Interchange Code
-
Why are octal and hexadecimal are preferred to binary. (1 mark)
Octal and hexadecimal number systems are preferred to binary because they offer a more compact and human-readable representation of long binary strings. They simplify the process of writing, reading, and remembering binary data, as each octal digit represents three binary bits and each hexadecimal digit represents four binary bits, making conversions straightforward.
-
Convert 243 into BCD. (2 marks)
To convert a decimal number to BCD, each decimal digit is converted to its 4-bit binary equivalent.
- Decimal digit 2 is 00102.
- Decimal digit 4 is 01002.
- Decimal digit 3 is 00112.
Combining these, we get:
243_{10} = \text{0010 0100 0011_{BCD}}
-
a) Convert 7.25 into Binary (3 marks)
Step 1: Convert the integer part (710) to binary.
7÷2=3remainder1
3÷2=1remainder1
1÷2=0remainder1
Reading the remainders from bottom to top: 710=1112.
Step 2: Convert the fractional part (0.2510) to binary.
0.25×2=0.50(integerpart0)
0.50×2=1.00(integerpart1)
Reading the integer parts from top to bottom: 0.2510=0.012.
Step 3: Combine the integer and fractional parts.
7.2510=111.012
-
b) Convert 10101.01102 into base 10. (3 marks)
Step 1: Convert the integer part (101012) to base 10.
1×24+0×23+1×22+0×21+1×20
=1×16+0×8+1×4+0×2+1×1
=16+0+4+0+1=2110
Step 2: Convert the fractional part (0.01102) to base 10.
0×2−1+1×2−2+1×2−3+0×2−4
=0×21+1×41+1×81+0×161
=0+0.25+0.125+0
=0.37510
Step 3: Combine the integer and fractional parts.
10101.01102=21+0.375=21.37510