136k views
3 votes
G a key part to designing digital logic is manipulating binary numbers. you might have learned number representation while working on your dac since the dac used a binary representation of a number to generate an analog voltage that represented the number.

a.express the decimal digit "6", "129" and "600" in binary. how many binary bits are needed? how many decimal bits are needed? (6)
b.if you wish to add two 2-bit binary numbers together, construct a truth table to describe the correct outputs of the simple adder. first, express the logic equation in terms of inputs a = (a1a0), b = (b1b0), and output s = (s2s1s0). second, complete a truth table. (21)

1 Answer

3 votes

2^0=1_(10)=1_2

2^1=2_(10)=10_2

2^2=4_(10)=100_2

\vdots

The pattern above tells you that the
nth power of 2 requires
n+1 binary digits. So


4=2^2<6<2^3=8\implies 6\text{ requires 3 binary digits}

6=4+2\implies6_(10)=110_2


128=2^7<129<2^8=256\implies129\text{ requires 8 binary digits}

129=128+1\implies129_(10)=10000001_2


512=2^9<600<2^(10)=1024\implies600\text{ requires 10 binary digits}

600=512+64+16+8\implies600_(10)=1001011000_2

Meanwhile, you clearly need 1, 3, 3 decimal digits (respectively) to represent the numbers in base 10.
User Tovah
by
8.7k points