56.1k views
3 votes
Design a Boolean circuit that verifies whether a given integer 0 ≤ x < 16 is divisible by 5

User Fadden
by
5.0k points

2 Answers

2 votes

Answer:

circuit is in the second attachment

Explanation:

Attached is a truth table for the desired circuit, where b3–b0 are the input bits, MSB–LSB. We notice that the output is true whenever b3=b1 and b2=b0. This can be written in DNF as ...


Y=b_3'b_2'b_1'b_0'+b_3b_2'b_1b_0'+b_3'b_2b_1'b_0+b_3b_2b_1b_0

More compactly, it can be written in terms of the exclusive-nor function as ...


y=(b_3\odot b_1)\wedge(b_2\odot b_0)

A circuit diagram showing this circuit is the second attachment. (A–D are the input bits, in order MSB–LSB (or its reverse)).

Design a Boolean circuit that verifies whether a given integer 0 ≤ x < 16 is divisible-example-1
Design a Boolean circuit that verifies whether a given integer 0 ≤ x < 16 is divisible-example-2
User Chujudzvin
by
5.3k points
2 votes

This question is incomplete, the complete question is;

Your boss asks you to design a Boolean circuit that verifies whether a given integer 0 < x < 16 is divisible by 5.

Every such number is represented in binary using four bits, say b₃b₂b₁b₀, and so your Boolean circuit will have four inputs. For instance, the number 13 is written in binary as 1101 and so to test its divisibility by 5 a user would feed the values b₀ = 1, b₁ = 0, b₂ = 1, and b₃ = 1 into the inputs of your circuit.

The Boolean circuit will have a single output, which should deliver the value 1 if the iput values represent a number that is divisible by 5 and 0 otherwise.

a) write down the truth table of the Boolean function F(b₀,b₁,b₂b₃) that implements this "divisible by 5" operation

b) construct a Boolean expression in disjunctive normal form that implements the Boolean function yo wrote down in a)

Answer:

Given that;

integer range = 0≤ x ≤ 16

within 4bits, we can represnt each number

(0,5,10,15)

a)

Truth table for function that implements divisible by 5

Integer B3 B2 B1 B0 Y

0 0 0 0 0 1

1 0 0 0 1 0

2 0 0 1 0 0

3 0 0 1 1 0

4 0 1 0 0 0

5 0 1 0 1 1

6 0 1 1 0 0

7 0 1 1 1 0

8 1 0 0 0 0

9 1 0 0 1 0

10 1 0 1 0 1

11 1 0 1 1 0

12 1 1 0 0 0

13 1 1 0 1 0

14 1 1 1 0 0

15 1 1 1 1 1

b)

Boolean expression that implements the Boolean function from a)

from the truth table;

Boolean expression Y is;

Y = b⁻₃b⁻₂b⁻₁b⁻₀ / y₁ + b⁻₃b₂b⁻₁b₀ / y₂ + b₃b⁻₂b₁b⁻₀ / y₃ + b₃b₂b₁b₀ / y₄

User Zax
by
5.8k points