Answer:
a)
b) (ₓ₂.ₓ₁.ₓ₀) + (ₓ₂.⁻ₓ₁.ₓ₀) +(⁻ₓ₂.ₓ₁.⁻ₓ₀) + (⁻ₓ₂.⁻ₓ₁.ₓ₀)
c) ⁻x₂
d) x₂
note ⁻x is the same as
Explanation:
<u>X contains only one 0</u>
This means that either must be 0. Lets assume that
then and .
Therefore . lets apply the same reasoning for cases
and . Thus if X contains only one 0,
.
On the other hand, if the above equality holds, then one of the "addends" must be 1. if , we must have , and = 1, so
therefore x contains only one 0.
proceeding similarly to other case.
The required logic function is
<u>X contains even number of zeros</u>
x has 3 digits, so x contains even number of zeros if and only if it contains 0 zeros or 2 zero.
suppose that it contains 0 zeros. Then so
suppose that x contains 2 zeros then it contains exactly 1 one, similarly to the first subtask we conclude that then we have
(ₓ₂.⁻ₓ₁.⁻ₓ₀)+(⁻ₓ₂.ₓ₁.⁻ₓ₀)+(⁻ₓ₂.⁻ₓ₁.ₓ₀) = 1
so if x contains even numbers of zeros then
(ₓ₂.ₓ₁.ₓ₀) + (ₓ₂.⁻ₓ₁.ₓ₀) +(⁻ₓ₂.ₓ₁.⁻ₓ₀) + (⁻ₓ₂.⁻ₓ₁.ₓ₀) = 1
now suppose that the above equality holds, then at least one of the addends must be 1. if (ₓ₂.ₓ₁.ₓ₀) = 1 we have ₓ₂ = ₓ₁ = ₓ₀ = 1
so x contains even numbers of zeros. If ₓ₂.⁻ₓ₁.⁻ₓ₀ = 1 we must have x₂ = ⁻x₁= ⁻x₀ = 1, so x₂ = 1, x₁ = 0, x₀ = 0. So x contains even number of zeros similarly for the other addends.
Therefore we can conclude that the required logic function is
(x₂.x₁.x₀) + (x₂.⁻x₁.⁻x₀) + (⁻x₂.x₁.⁻x₀) + (⁻x₂.⁻x₁.x₀)
<u>x interpreted as and unsigned integer is less that 4</u>
using the properties of the binary base, we know that x < 4 if and only if x₂ = 0. So x < 4 if and only ⁻x₂ = 1, thus the required logic function is ⁻x₂
<u>x interpreted as a signed integer is negative</u>
using the definition of two complement it is easy to see that x is negative if and only if x₂=1, so therefore the required logic function is x₂.
Note ⁻x is the same as