MODULE 1 ASSIGN. 2 QUESTIONS

¡Supera tus tareas y exámenes ahora con Quizwiz!

Why is binary data representation and signaling the preferred method of computer hardware implementation?

Binary signals are preferred because they can be processed with two-state electrical devices that are easily and inexpensively constructed.

What is a data structure? List several types of common data structures.

Data structure is structure grouping of primitive (basic) data items. Arrays, records, and linked lists are commonly used data structures.

What is the numeric range of a 16-bit twos complement value? A 16-bit excess notation value? A 16-bit unsigned binary value?

-(2n-1) to (2n-1 - 1), where 'n' is the number of bits used to store the value. The exponent is n-1 because 1 bit is used for the sign. Only 16 bits are allocated to the whole portion of the value. Therefore, the largest possible whole value is 2^16 - 1.

What are the differences between ASCII and Unicode?

-ASCII is a widely accepted standard approved by recognized standard setting agencies (and is a subset of Unicode). -Unicode is a coding table that assigns nonnegative integers to represent printable characters. Is incorporated into Unicode as the first 256 table entries. An important difference between ASCII and Unicode is the size of the coding table.

What is an address? What is a pointer? What purpose are they used for?

-An address is a number or set of numbers that represent a specific storage location in a storage device. -A pointer is a data item that contains an address. -Pointers and memory addresses are used to tie together parts of a data structure such as a linked list or indexed file.

How is an array stored in main memory? How is a linked list stored in main memory? What are their comparative advantages and disadvantages? Give examples of data that would be best stored as an array and as a linked list.

-An array is stored in contiguous sequential memory locations, with the first element at the lowest address. For example, in pseudocode it could appear as [0]. -A linked list is stored in memory as an unordered and non-contiguous set of list elements, each consisting of a data value and a pointer to the next data list element. -Advantages / Disadvantages: Arrays are more compact and easier to read or write than linked lists. Linked lists are easier to update than arrays. Any data item that is of fixed length and seldom changes value (e.g., a customer name field) is best stored in an array. -Data items that are of variable length, large size, and which have frequent value changes (example: a process queue) are best stored as a linked list.

What is excess notation? What is twos complement notation? Why are they needed? In other words, why can't integer values be represented by ordinary binary numbers?

-Excess notation represents numbers in order using the number at the transition point of the high-order bit as zero. -Twos complement notation encodes positive values as ordinary binary numbers and encodes negative values as the complement of the corresponding positive value plus 1. -Two reasons enable CPU manufacturers to build processors with fewer components than are needed for other integer data formats, which saves money and increases computational speed. For these reasons, all modern CPUs represent and manipulate signed integers by using twos complement format.

What is overflow? What is underflow? How can the probability of their occurrence be minimized?

-Overflow is a condition that occurs when the output of an instruction execution is too large in absolute value to store in a register. -Underflow is a condition that occurs when the output of a floating point computation instruction overflows the exponent field. -Both conditions can be avoided by allocating a sufficient number of bit positions for data storage or by scaling input values.

How does a class differ from other data structures?

A class includes methods, which are executable instructions, in addition to static data.

Why doesn't a CPU evaluate the expression 'A' = 'a' as true?

The CPU can compare only numeric values, so each character constant is converted to its numeric value in some character coding scheme, such as ASCII, EBCDIC, or Unicode. Because all modern character coding schemes encode uppercase and lowercase letters as different numeric values, the equality comparison always returns false.

What primitive data types can normally be represented and processed by a CPU?

The basic CPU data types are integer, real, boolean, and pointer (aka memory address). A character may also be considered a basic data type though it is normally represented as an integer.

Why might a programmer choose to represent a data item in IEEE binary128 floating-point format instead of IEEE binary64 floating-point format? What additional costs might be incurred at runtime (when the application program executes) as a result of using the 128-bit instead of the 64-bit format?

The larger format increases both the range of values that can be represented and the precision of large and small values. Processing data represented in the larger format requires either more complex processing circuitry or the execution of multiple instructions.

What are the binary, octal, and hexadecimal representations of the decimal number 10?

binary = 1010 octal = 12 hexadecimal = A


Conjuntos de estudio relacionados

ISDS 409 Ch 5 Network and transport layers

View Set

CHAPTERS 4,5,6,, High risk antepartum Nursing Care

View Set

ITSY Ch 5.5 Virtual Private Networks (VPN)

View Set

CIS 420 Exam 1/midterm chapters 1-6

View Set