Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please edit your code on the following code I provided PLEASE ONLY USE THESE THR

ID: 3889331 • Letter: P

Question

Please edit your code on the following code I provided

PLEASE ONLY USE THESE THREE HEADERS I PROVIDED!!

I DO RATE THE ANSWER, PLEASE ANSWER IT AS ACCURATE AS POSSIBLE.

EXAMPLE: Consider a 16-byte file composed of all Os stored in a character array named data and a password string "cse250" data (hex representation): 00000000000000000000000000000000 data (as chars): e1ele1e1elele1e1elele1e1e elele password (as chars): cse250 Then we can encrypt by computing an XOR between the password and the data. Fortunately, computing 0 ^ x = x, so taking the XOR of our password with data that is all 0 will simply create repeated copies of our password. XOR: C se250 cs e 2 5 0 cse 2

Explanation / Answer

To answer this, you should initially forget about the negative sign. You'll run into a problem if you deal with it now (in particular, you may end up convering -6 to 2C and .125 to UB, and then put them together, which wouldn't make sense.

So, we follow the usual steps:

To get the fraction part, it's useful to know that 2-1 = .5, 2-2 = .25, 2-3 = .125.

The algorithm runs as follows. To convert x (a number less than 1 written in base 10) to binary, do:

It's useful to indicate the number of bits or the bit subscripts to show you know how many bits there are.