(a) Convert the following numbers to be stated bases:
(i) 125.625, to binary
(ii) 111011.10011, to octal
(b) Given that X = 11011011 and Y= 11101101,
(i) construct the truth table for X, Y Z;
(ii) draw the logic gate of X, Y = Z
(iii) state the value of Z.
(a) Number conversions
(i) 125.62510 to binary
Integer part - divide 125 repeatedly by 2 and read the remainders upwards:
| ÷ 2 | Quotient | Remainder |
| 125 | 62 | 1 |
| 62 | 31 | 0 |
| 31 | 15 | 1 |
| 15 | 7 | 1 |
| 7 | 3 | 1 |
| 3 | 1 | 1 |
| 1 | 0 | 1 |
Reading upwards, \(125_{10} = 1111101_2\).
Fraction part - multiply 0.625 by 2 and read the carries downwards: \(0.625\times2=1.25\) (1); \(0.25\times2=0.5\) (0); \(0.5\times2=1.0\) (1). So \(0.625 = 0.101_2\).
\[ 125.625_{10} = 1111101.101_2 \]
(ii) 111011.100112 to octal
Group the bits in threes from the binary point, padding with zeros:
Integer: \(111\;011 \rightarrow 7\;3\). Fraction: \(100\;110 \rightarrow 4\;6\).
\[ 111011.10011_2 = 73.46_8 \]
(b) Logic on X = 11011011 and Y = 11101101, with Z = X AND Y
(i) Truth table for a two-input AND gate
| X | Y | Z = X.Y |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
(ii) Logic gate
A two-input AND gate is used: inputs X and Y enter the flat left edge of the D-shaped symbol and the single output Z leaves the curved right edge. Z is 1 only when both X and Y are 1.
(iii) Value of Z (bit-by-bit AND)
| X | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 |
| Y | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| Z | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
\[ Z = 11001001_2 \]
(a) Number conversions
(i) 125.62510 to binary
Integer part - divide 125 repeatedly by 2 and read the remainders upwards:
| ÷ 2 | Quotient | Remainder |
| 125 | 62 | 1 |
| 62 | 31 | 0 |
| 31 | 15 | 1 |
| 15 | 7 | 1 |
| 7 | 3 | 1 |
| 3 | 1 | 1 |
| 1 | 0 | 1 |
Reading upwards, \(125_{10} = 1111101_2\).
Fraction part - multiply 0.625 by 2 and read the carries downwards: \(0.625\times2=1.25\) (1); \(0.25\times2=0.5\) (0); \(0.5\times2=1.0\) (1). So \(0.625 = 0.101_2\).
\[ 125.625_{10} = 1111101.101_2 \]
(ii) 111011.100112 to octal
Group the bits in threes from the binary point, padding with zeros:
Integer: \(111\;011 \rightarrow 7\;3\). Fraction: \(100\;110 \rightarrow 4\;6\).
\[ 111011.10011_2 = 73.46_8 \]
(b) Logic on X = 11011011 and Y = 11101101, with Z = X AND Y
(i) Truth table for a two-input AND gate
| X | Y | Z = X.Y |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
(ii) Logic gate
A two-input AND gate is used: inputs X and Y enter the flat left edge of the D-shaped symbol and the single output Z leaves the curved right edge. Z is 1 only when both X and Y are 1.
(iii) Value of Z (bit-by-bit AND)
| X | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 |
| Y | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 |
| Z | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
\[ Z = 11001001_2 \]