For each of the following, see if you can figure out the representation in terms of bits and bytes.

(a) Internet addresses are four numbers, each between 0 and 255. How many bits are in an Internet address?
(b) In the ancient programming language Basic, lines can be numbered, each one between 0 and 65,535. How many bits are needed to represent a line number?
(c) Each pixel’s color has three components, red, green, and blue, each of which can be between 0 and 255. How many bits are needed to represent a pixel’s color?
(d) A string in some systems can only be up to 1,024 characters. How many bits are needed to represent the length of a string?


(a) Since it takes 8 bits to represent 256 numbers, it’ll require four sections of eight bits, meaning


(b)


(c) 24 bits, as 8 bits can represent one value between 0 and 255.


(d)

Computer Science & Information Technology

You might also like to view...

SQL keyword _________ is followed by the selection criteria that specify the records to select in a query.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Assume a schema for the following set of relations :

Shelves(Sid, Size) with primary key Sid
Items(Iid, Man, Name, Space, Cost, Price) with primary key Iid
Stores(Iid, Sid, Remove Date) with primary key Iid
(a) Give a SELECT statement that returns all rows of Shelves. (b) Give a SELECT statement that returns all rows of Shelves corresponding to shelves that have a size greater than 100. (c) Give a SELECT statement that returns the manufacturer and name in all rows of Items corresponding to items whose retail price is more than twice its cost. (d) Give a SELECT statement that returns the manufacturer and name in all rows of Items corresponding to items stored on the shelf whose Sid has value 12345. (e) We would like the database schema to enforce the restriction that, for any item stored on a shelf, the space occupied by the item not exceed the size of the shelf. Use SQL to do this.

Computer Science & Information Technology

Which of the following statements declares a Double variable nameddblAverage?

A. Dim dblAverage As Double B. Dim As Double dblAverage C. Const dblAverage As Constant D. Dim dblAverage As Single

Computer Science & Information Technology

A sentinel value is a(n) ____________. It is a value that should not be processed.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology