Question: Recall from Chapter 1 that computer memory is comprised of individual bits of data. A bit (short for binary digit) can store one of only

Recall from Chapter 1 that computer memory is comprised of individual bits of data. A bit (short for binary digit) can store one of only two values, commonly referred to as 0 and 1. However, using two bits, you can represent four different values through the bit patterns 00, 01, 10, and 11. With three bits, you can represent eight different values-via 000, 001, 010, 011, 100, 101, 110, and 111. In general, N bits of memory enable you to represent 2N different values.

Create a Web page named bits.html that contains a text box where the user can enter a number, call it N. At the click of a button, your page should compute and display 2N, the number of values that can be represented using the specified quantity of bits. For example, if the user entered 10 in the text box, the page would display the message:

With 10 bits, you can represent 1024 different values.

Once you have created your page, use it to determine the number of values that each of the following can represent:

8 bits (1 byte)

16 bits (2 byte)

32 bits (4 bytes)

64 bits (8 bytes)

Step by Step Solution

3.38 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

1409-C-S-O-S(993).docx

120 KBs Word File

Students Have Also Explored These Related Operating System Questions!