Question: Problem 5 . ( 1 0 points ) Let x 3 x 2 x 1 x 0 be a 4 - bit binary number. a

Problem 5.(10 points) Let x3x2x1x0 be a 4-bit binary number.
a) Write an expression in Boolean algebra that evaluates to 1 when an even number of bits of the
number is one and 0 otherwise. Submit a file named p5a.py.
Examples: 0110 evaluates to 1 but 0010 evaluates to 0.
b) Write an expression in Boolean algebra that evaluates to 1 when the number is an even number
and 0 otherwise. Submit a file named p5b.py.
Examples: 1110 evaluates to 1 but 1011 evaluates to 0.
c) Write an expression in Boolean algebra that evaluates to 1 when the number is a non-zero
number and 0 otherwise. Submit a file named p5c.py.
Examples: 1110 evaluates to 1 and 0001 evaluates to 1 but 0000 evaluates to 0.
d) Write an expression in Boolean algebra that evaluates to 1 when the number is not a non-zero
even number and the number does not have even number of ones, and 0 otherwise. Submit a file
named p5d.py.
Examples: 0000(it has even number of ones) and 0011(it has even number of ones) and 1110(it
is a non-zero even) evaluate to 0 but 0001 and 1011 evaluate to 1.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!