please use C++ Create a class named Byte that encapsulates an array of 8 Bit objects. The...

70.2K

Verified Solution

Question

Programming

please use C++

Create a class named Byte that encapsulates an array of 8 Bitobjects. The Byte class will provide the following memberfunctions:

Byte - word: Bit[8] static Bit array defaults to all Bitsfalse

+ BITS_PER_BYTE: Integer16 Size of a byte constant in Bits;8

+ Byte() default constructor

+ Byte(Byte) copy constructor

+ set(Integer): void sets Bit to true

+ clear(): void sets to 0

+ load(Byte): void sets Byte to the passed Byte

+ read(): Integer16 returns Byte as Integer

+ place(Integer): Bit Return Bit& at passed Base2 place

+ NOT(): Byte returns this Byte with its bits not'ed

+ AND(Byte): Byte returns this Byte and'ed with passed Byte

+ OR(Byte): Byte returns this Byte or'ed with passed Byte

+ NAND(Byte): Byte returns this Byte nand'ed with passedByte

+ NOR(Byte): Byte returns this Byte nor'ed with passed Byte

+ XOR(Byte): Byte returns this Byte xor'ed with passed Byte

+ XNOR(Byte): Byte returns this Byte xnor'ed with passedByte

Answer & Explanation Solved by verified expert
3.7 Ratings (577 Votes)
includeincludeusing namespace stdclass Byte public int Bit8 const int    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students