Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions