1. Homepage
  2. Homework
  3. Introduction to Computer Systems - Bitwise Boolean Arithmetic Operators
This question has been solved

Introduction to Computer Systems - Bitwise Boolean Arithmetic Operators

Engage in a Conversation
Introduction to Computer SystemsBitwise Boolean Arithmetic Operators


CourseNana.COM

CourseNana.COM

Question #2 CourseNana.COM


CourseNana.COM


CourseNana.COM

In class and in Data Lab, you will learn and interact a lot with the bitwise Boolean arithmetic operators provided by C, & | ^ ~,  as well as some useful tools for manipulating Boolean formulas, such as De Morgan’s Laws. CourseNana.COM

  CourseNana.COM

a.     Write a formula that calculates a & b using only the ~ and | operators. (Hint: this is one of De Morgan’s Laws.) CourseNana.COM


CourseNana.COM

CourseNana.COM

b.     Write a formula that calculates a | b using only ~ and & operations. (Hint: this is the other one.) CourseNana.COM


CourseNana.COM

c.     Write a formula that calculates a ^ b using only ~, &, and | operations. (Hint: this is not one of De Morgan’s Laws.) CourseNana.COM


CourseNana.COM

CourseNana.COM

d.     As you can see from the previous three questions, it’s not technically necessary to have all of the Boolean operators in your programming language; if you had only AND and NOT, you could construct all of the others from them. This is called “functional completeness.” There are two special Boolean operators that are functionally complete all by themselves: if you have either NAND (a NAND b == ~(a & b)) or NOR (a NOR b == ~(a | b)) then you can construct all the other Boolean operators from them.

Write formulas that compute ~a, a | b, and a & b using only NOR. As shorthand, you can use a $ b to mean a NOR b.
CourseNana.COM


CourseNana.COM


CourseNana.COM


CourseNana.COM


CourseNana.COM


CourseNana.COM


CourseNana.COM


CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
Introduction to Computer Systems代写,Bitwise Boolean Arithmetic Operators代写,Introduction to Computer Systems代编,Bitwise Boolean Arithmetic Operators代编,Introduction to Computer Systems代考,Bitwise Boolean Arithmetic Operators代考,Introduction to Computer Systemshelp,Bitwise Boolean Arithmetic Operatorshelp,Introduction to Computer Systems作业代写,Bitwise Boolean Arithmetic Operators作业代写,Introduction to Computer Systems编程代写,Bitwise Boolean Arithmetic Operators编程代写,Introduction to Computer Systemsprogramming help,Bitwise Boolean Arithmetic Operatorsprogramming help,Introduction to Computer Systemsassignment help,Bitwise Boolean Arithmetic Operatorsassignment help,Introduction to Computer Systemssolution,Bitwise Boolean Arithmetic Operatorssolution,