CHAPTER 5: Representing Numerical Data Flashcards

1
Q

How do computers store all data and program instructions?

a) As decimal numbers.
b) As ASCII characters
c) As binary numbers.
d) As algebraic equations.

A

c) As binary numbers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The binary numbers in a computer might represent

a) images.
b) numbers.
c) characters.
d) All of the above

A

d) All of the above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What numbers are generally manipulated as characters?

a) Zip code.
b) Telephone number.
c) Grade point average.
d) Both a and c.

A

d) Both a and c.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When the number to be expressed is outside of the integer range of the computer (too large or too small), or when the number contains a fractional part it must be stored as a(n)

a) constant.
b) exponent.
c) complement.
d) real number.

A

d) real number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An 8-bit storage location can store any unsigned integer of value between 0 and

a) 7
b) 16
c) 255
d) 512

A

c) 255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does BCD stand for?

a) Binary-Coded Decimal
b) Binary Calculating Device
c) Binary Common Denominator
d) Binary Character Data

A

a) Binary-Coded Decimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the range of a 1 byte number stored in BCD format?

a) 0-9
b) 0-99
c) 0-999
d) 0-9999

A

b) 0-99

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How many BCD digits can be stored in one byte?

a) 1
b) 2
c) 7
d) 255

A

b) 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the most common way to represent negative integers in binary form?

a) As BCD
b) Using 2’s complement
c) Using sign-and-magnitude
d) None of the above

A

b) Using 2’s complement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If we complement the value twice, it will

a) be twice as big.
b) return to its original value.
c) cause an overflow error.
d) reset the carry flag.

A

b) return to its original value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A combination of numbers that produces a result outside the available range is known as

a) overload.
b) overflow.
c) spillover.
d) wraparound.

A

b) overflow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Changing every 0 to a 1 and every 1 to a 0 is also known as

a) reversion.
b) inversion.
c) diversion.
d) conversion.

A

b) inversion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Using sign-and-magnitude representation, the largest positive number that can be stored in 8 bits is

a) 7
b) 127
c) 255
d) 512

A

b) 127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Using sign-and-magnitude representation, if the leftmost bit is 1 the number is

a) positive.
b) negative.
c) an error.
d) a character

A

b) negative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If both inputs to an addition have the same sign, and the output sign is different then

a) the leftmost bit should wrap around.
b) the leftmost bit should be disregarded.
c) the range is insufficient to hold the result.
d) you must take the complement of the result.

A

c) the range is insufficient to hold the result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Using sign-and-magnitude representation, storing the number -12 in 4 bits is

a) 1100
b) 0011
c) 0100
d) impossible.

A

d) impossible.

17
Q

In 1’s and 2’s complement representations, a negative number begins with

a) -1
b) 0
c) 1
d) -0

A

c) 1

18
Q

How do you find the 2’s complement of positive numbers?

a) Invert the numbers
b) Invert the numbers and add one
c) Invert the numbers and wrap around the leftmost bit
d) Do nothing, the complement is the same as the original

A

b) Invert the numbers and add one

19
Q

How do you find the 2’s complement of negative numbers?

a) Invert the numbers.
b) Invert the numbers and add one.
c) Invert the numbers and wrap around the leftmost bit.
d) Do nothing, the complement is the same as the original.

A

b) Invert the numbers and add one.

20
Q

When adding two numbers using 2’s complement, carries beyond the leftmost digit are

a) inverted.
b) ignored.
c) shifted left.
d) shifted right.

A

b) ignored.

21
Q

What is the 8-bit 2’s complement representation for -35?

a) 11011101
b) 01011101
c) 11011100
d) 11011111

A

a) 11011101

22
Q

To correct for carries and borrows that occur when large numbers must be separated into parts to perform additions and subtractions, we use

a) a bit hold.
b) a carry flag.
c) an error flag.
d) an overflow flag.

A

b) a carry flag.

23
Q

What is the number 12.345 x 10² without using exponential notation?

a) 0.12345
b) 123.45
c) 1234.5
d) 12345

A

c) 1234.5

24
Q

In excess-50 notation, an exponent can range from

a) 0 to 50
b) -50 to 49
c) -49 to 50
d) -99 to 99

A

b) -50 to 49

25
Q

In excess-50 notation, an exponent equaling 17 is stored as

a) -37
b) 17
c) 67
d) 87

A

c) 67

26
Q

Shifting numbers left and increasing the exponent until leading zeros are eliminated is called

a) conversion.
b) factorization.
c) normalization.
d) excess notation.

A

c) normalization.

27
Q

The leftmost bit in an IEEE standard floating point number represents

a) the exponent.
b) the mantissa.
c) the sign of the mantissa.
d) the sign of the exponent.

A

c) the sign of the mantissa.

28
Q

The exponent of a floating point number is stored using

a) excess N notation.
b) one’s complement.
c) two’s complement.
d) binary coded decimal.

A

a) excess N notation.

29
Q

In the IEEE 754 standard 32 bit single-precision floating point format, how many bits are allocated to the exponent?

a) 1
b) 2
c) 7
d) 8

A

d) 8

30
Q

In the IEEE 754 standard 32 bit single-precision floating point format, how many bits are allocated to the mantissa?

a) 8
b) 16
c) 23
d) 24

A

c) 23

31
Q

With floating point numbers, to add and subtract require that

a) the sign in each number be equal.
b) the mantissa in each number be equal.
c) the exponents in each number be equal.
d) you convert to decimal to perform the operation.

A

c) the exponents in each number be equal.

32
Q

In the normalized IEEE 754 standard 32 bit single-precision floating point format, the leading bit of the mantissa is

a) the sign bit.
b) not stored.
c) always a zero.
d) used for larger exponents.

A

b) not stored.

33
Q

In the IEEE 754 standard 32 bit single-precision floating point format the number “zero” is

a) impossible to represent.
b) treated as a special case.
c) has a mantissa of all ones.
d) has an exponent of all ones.

A

b) treated as a special case.

34
Q

The Department of Motor Vehicles is developing a software program that uses a variable to count the number of cars being sold each day. The maximum number of cars sold is expected to be several million over the life of the program and there are no fractional sales. What data type will you use for this variable?

a) float 32-bit
b) float 64-bit
c) integer long 64-bit
d) integer short 32-bit

A

c) integer long 64-bit

35
Q

Calculations with floating point numbers

a) are faster than integer calculations.
b) are more precise than integer calculations.
c) typically require less storage space than integers for the results. d) None of the above.

A

d) None of the above.