• Home
  • Textbooks
  • Essential discrete math for computer science
  • Boolean Algebra

Essential discrete math for computer science

Feil T., Krone J.

Chapter 3

Boolean Algebra - all with Video Answers

Educators


Chapter Questions

Problem 1

For propositional logic, prove the following, if you have not already done so:
a. $\wedge$ and $\vee$ are commutative and associative.
b. $\vee$ distributes over $\wedge$.
c. $T$ is the identity for $\wedge$ and $F$ is the identity for $\vee$.

Check back soon!
01:04

Problem 2

a. Write $p \Rightarrow q$ in DNF.
b. Simplify your expression (use only $\vee, \wedge$, and $\neg$ ).

Emily Min
Emily Min
Numerade Educator
02:06

Problem 3

Construct a truth table for $\neg(p \vee \neg q) \Rightarrow \neg p$.

James Chok
James Chok
Numerade Educator
02:06

Problem 4

Construct a truth table for $(p \wedge q) \Rightarrow p$.

James Chok
James Chok
Numerade Educator
00:40

Problem 5

Write the negation and simplify $(q \vee r) \wedge(\neg q \vee r)$.

Amy Jiang
Amy Jiang
Numerade Educator
00:40

Problem 6

Write the negation and simplify $p \vee q \vee(\neg p \wedge \neg q \wedge r)$.

Amy Jiang
Amy Jiang
Numerade Educator
00:25

Problem 7

The following are known as the absorption laws for logic: $p \vee(p \wedge q)=p$ and $p \wedge(p \vee q)=p$. Prove these using truth tables.
How would you write the corresponding statements for Boolean algebras?

Amy Jiang
Amy Jiang
Numerade Educator
01:26

Problem 8

You can prove the absorption laws for all Boolean algebras using just stuff you know about Boolean algebras. But there's a little trick. (There always is.) Here's the first step in showing that $p+(p * q)=p: \quad p+(p * q)=$ $(p * 1)+(p * q)=\cdots$. Now continue reducing until you get $p$.
Use a similar trick to show the other absorption law for Boolean algebras.

Manisha Sarker
Manisha Sarker
Numerade Educator
02:23

Problem 9

Simplify: $A B+\left(B^{\prime} C\right)^{\prime}+\left(D+C^{\prime}\right)$. Draw the simplified circuit.

Jonathan Turovsky
Jonathan Turovsky
Numerade Educator

Problem 10

It turns out you can construct the equivalent to an or gate using just and and not gates. Do so.

Check back soon!

Problem 11

Likewise, you can construct the equivalent to an and gate using just or and not gates. Do so.

Check back soon!

Problem 12

What is the largest (unsigned) integer you can store in 4 bits? In 8 bits? in 16 bits? In $n$ bits? (Give your answers in decimal.)

Check back soon!
03:07

Problem 13

Add these binary integers: $11010+1011, \quad 1011+110$, $11111110111+1001$.

Ahmad Reda
Ahmad Reda
Numerade Educator
05:16

Problem 14

Convert these decimals to binary: $90,52,41$.

Willis James
Willis James
Numerade Educator
01:33

Problem 15

Convert from binary to decimal: $111101,100010,111000000$.

Ahmad Reda
Ahmad Reda
Numerade Educator
01:00

Problem 16

If an integer is written in binary, how can you easily tell it is even? If it is odd?

Raj Bala
Raj Bala
Numerade Educator
01:27

Problem 17

When doing arithmetic in the base 10 system, multiplying and dividing by 10 or powers of 10 can be done easily by moving the decimal point. How can you do multiplying and dividing by 2 and powers of 2 in the binary system?

Varsha Aggarwal
Varsha Aggarwal
Numerade Educator
01:33

Problem 18

Suppose you want to represent real numbers in binary form. How would you represent one half? Hint: Since on the right of the binary point, each position will stand for a negative power of 2 , the first position stands for $2^{-1}$, the second position for $2^{-2}$, and so on.

Ahmad Reda
Ahmad Reda
Numerade Educator

Problem 19

Given the base 10 numeral 234.75 , represent the number it stands for in base 2 .

Check back soon!
01:38

Problem 20

Add the binary numbers: $110101.101+1100011.011$.

Ahmad Reda
Ahmad Reda
Numerade Educator
00:33

Problem 21

If $a$ and $b$ are integers, what is $(a+b)^2 ?(a+b)^3$ ? $(a+$ $b)^n$ ? If $a$ and $b$ are elements of a Boolean algebra, what is $(a+b)^2 ?(a+b)^3$ ? $(a+b)^n$ ? (Here, $(a+b)^2$ is shorthand for $(a+b) *(a+b)$. The other exponents stand for similar expressions.)

Nick Johnson
Nick Johnson
Numerade Educator

Problem 22

Show that if $B$ is a Boolean algebra, then there can be no element $a \in B$ where $a \neq 0$ and $a \neq 1$ such that $a^{\prime}=a$. (That is, $a$ can't be self-dualing.)

Check back soon!
01:42

Problem 23

Show that there is no Boolean algebra with exactly three elements.

Manisha Sarker
Manisha Sarker
Numerade Educator

Problem 24

Can you find a Boolean algebra with four elements? With five elements? With six elements? For an extra challenge, can you generalize?

Check back soon!
01:22

Problem 25

You showed that the collection of subsets of any given finite set can form a Boolean algebra with appropriately chosen operations. Is the same true of an infinite set?

Adriano Chikande
Adriano Chikande
Numerade Educator
02:50

Problem 26

Suppose $p$ is a proposition. What is the dual of $p$ ? (Note that for your choice to work properly, Axiom 3 must be satisfied.) Verify that Axiom 3 is indeed satisfied. Now show that the well-formed expressions of propositional logic form a Boolean algebra.

Prathan Jarupoonphol
Prathan Jarupoonphol
Numerade Educator
01:57

Problem 27

Write the duals of all the theorems in this chapter.

Ethan Somes
Ethan Somes
Numerade Educator

Problem 28

We noted that the dual of a Boolean algebra theorem is one where the +'s and *'s are exchanged and the 0's and 1 's are exchanged in the original theorem. The principle of duality says that the dual of any Boolean algebra theorem is also true. Prove that the four axioms of Boolean algebra are self-dualing. That is, the dual of each axiom is itself. Why does the principle of duality follow from this?

Check back soon!
01:22

Problem 29

Consider the collection of all integers with the usual elements 0 and 1 , together with the usual addition and multiplication. We've seen that this is not a Boolean algebra since + does not distribute over $*$. Which of the other axioms for Boolean algebras do the integers satisfy and which do they not satisfy?

Adriano Chikande
Adriano Chikande
Numerade Educator
01:56

Problem 30

Let $B=\{0,1\}$, with + defined to be the usual addition modulo 2 and $*$ the usual multiplication. Is $B$ a Boolean algebra?

Adriano Chikande
Adriano Chikande
Numerade Educator
01:24

Problem 31

Prove Theorems 3 through 8 on Boolean algebras.

Vikash Ranjan
Vikash Ranjan
Numerade Educator

Problem 32

If $a, b$, and $c$ are elements in some Boolean algebra, show that the following four expressions are equivalent:
$$
\begin{array}{cc}
(a+b) *\left(a^{\prime}+c\right) *(b+c) & a * c+a^{\prime} * b+b * c \\
(a+b) *\left(a^{\prime}+c\right) & a * c+a^{\prime} * b
\end{array}
$$

Check back soon!

Problem 33

Show that $a * b+b * c+c * a=(a+b) *(b+c) *(c+a)$, where $a, b$, and $c$ are elements of a Boolean algebra.

Check back soon!

Problem 34

If $a, b$ and $c$ are elements of some Boolean algebra, and if both $a * b=a * c$ and $a+b=a+c$, then show that $b=c$.

Check back soon!

Problem 35

If $a, b$, and $c$ are elements of some Boolean algebra, then show that if $a * x=b * x$ and $a * x^{\prime}=b * x^{\prime}$ for all $x$ in the Boolean algebra, then $a=b$.

Check back soon!

Problem 36

If $a, b$, and $c$ are elements of some Boolean algebra, define $a \leq b$ if and only if $a * b^{\prime}=0$. Show that if $a \leq b$, then $a+b * c=b *(a+c)$ for all $c$.

Check back soon!

Problem 37

For $a, b$, and $c$ in some Boolean algebra, show that
a. If $a \leq b$ and $b \leq c$, then $a \leq c$.
b. If $a \leq b$ and $a \leq c$, then $a \leq b c$.
c. If $a \leq b$, then $a \leq b+c$ for all $c$.
d. $a \leq b$ if and only if $b^{\prime} \leq a^{\prime}$.

Check back soon!

Problem 38

For $a, b$, and $c$ in some Boolean algebra, show that $a=b$ if and only if $a * b^{\prime}+a^{\prime} * b=0$.

Check back soon!
01:16

Problem 39

Let $S=\{1,2 \ldots, n\}$ for some positive integer $n$. On $S$ define $x+y=\max \{x, y\}$ and $x * y=\min \{x, y\}$. Can you find a way to make $S$ a Boolean algebra with these two operations?

Adriano Chikande
Adriano Chikande
Numerade Educator

Problem 40

Suppose $a$ and $b$ are elements of a Boolean algebra. Show that the following are equivalent: $a b=a, a+b=b$, $a^{\prime}+b=1, a b^{\prime}=0$.

Check back soon!
36:47

Problem 41

Let $S$ be the set of positive divisors of 110 (i.e., $S=$ $\{1,2,5,10,11,22,55,110\})$. Show that $S$ together with the operations gcd (greatest common divisor) and lcm (least common multiple) forms a Boolean algebra. You will need to figure out what the dual of each element is and what the zero element and the one element should be.

Oswaldo Jiménez
Oswaldo Jiménez
Numerade Educator
02:21

Problem 42

Let $S$ be the set of positive divisors of 18 (i.e., $S=\{1,2,3$, $6,9,18\})$. Show that this set together with gcd and $\mathrm{lcm}$ does not form a Boolean algebra.

Adriano Chikande
Adriano Chikande
Numerade Educator
01:16

Problem 43

Based on the previous two exercises, make a conjecture as to what sets of divisors do make Boolean algebras when the operations are ged and lcm.

Adriano Chikande
Adriano Chikande
Numerade Educator
01:22

Problem 44

A set is called "cofinite" if its complement is finite. Let $U$ be the set of all finite and cofinite subsets of the natural numbers. Prove that the subsets of $U$ together with the operations union, intersection, and complement, forms a Boolean algebra.

Adriano Chikande
Adriano Chikande
Numerade Educator
06:48

Problem 45

Construct circuits for these expressions: (i) $A B^{\prime}+C B^{\prime}+A$, (ii) $\left(A+C^{\prime}\right)\left(B+C^{\prime}\right) A$.

M Hassan Anwar
M Hassan Anwar
Numerade Educator
00:28

Problem 46

Simplify the expressions in Exercise 45 and draw the circuits.

Amy Jiang
Amy Jiang
Numerade Educator
02:29

Problem 47

Draw a circuit with four inputs whose output is their sum (in binary). Note that the possible outputs are $0,1,10$, 11 , and 100 . Thus you need how many bits for output here? (Recall that each output line means a new circuit.) You may use full or half adders in your circuit, if you wish.

Sriram Soundarrajan
Sriram Soundarrajan
Numerade Educator
01:18

Problem 48

Draw a circuit with three inputs, call them $A, B$, and $C$, whose output is 1 if $A$ equals the sum of $B$ and $C$.

Adriano Chikande
Adriano Chikande
Numerade Educator

Problem 49

Draw a circuit with three inputs whose output is 1 when an odd number of inputs are 1 . (Try to use XOR gates in your circuit to make it simple.)

Check back soon!
01:11

Problem 50

Draw a switching circuit for the expression $A\left(B^{\prime}+A^{\prime} C\right)$. Same question for $\left(B+A^{\prime}\right)\left(A C^{\prime}+B^{\prime} C\right)$.

Kris Bright
Kris Bright
Numerade Educator
00:41

Problem 51

Simplify the two expressions in the previous exercise and redraw the circuits.

Amy Jiang
Amy Jiang
Numerade Educator
02:29

Problem 52

Build a 4-bit adder from four full adders. The inputs for this circuit will be the four bits for one 4-bit summand, $A_0, A_1, A_2, A_3$; another four bits for the other summand, $B_0, B_1, B_2, B_3$; and the carry-in for the right-most bit, $c_{\text {in }}$. Note that $c_{\text {in }}$ will be wired to 0 when using this as a stand alone 4-bit adder. What should the outputs be? What would the black box diagram for this 4-bit adder look like? Using your black box diagram, design an 8-bit adder.

Sriram Soundarrajan
Sriram Soundarrajan
Numerade Educator

Problem 53

Give a Boolean expression for each circuit shown.
(Fig. can't copy)

Check back soon!

Problem 54

Simplify the Boolean expressions you got in the previous exercise and draw the circuits you get. Give the truth tables for both the original circuit and the simplified ones and check that they are indeed equivalent.

Check back soon!
01:26

Problem 55

Suppose we call two circuits equivalent if they have the same truth table. We have seen that for any one circuit, there are many circuits equivalent to it. Call the collection of all circuits that are equivalent an equivalence class of circuits. Now consider all circuits with two inputs and one output. How many equivalence classes are there for these circuits? (This is the same as the question "How many different truth tables are there with two inputs?") Answer the same question for three-input circuits. Answer the same question for circuits with $n$ inputs.

Varsha Aggarwal
Varsha Aggarwal
Numerade Educator