study_flashcards_with_answers

1
Q

What are unsigned integers?

A

Unsigned integers are positive whole numbers without a sign bit.

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

How is a decimal integer converted to binary?

A

A decimal integer is converted to binary by expressing it in powers of 2.

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

What is the value range for 4-bit BCD vs binary?

A

4-bit BCD can represent values from 0 to 9, while 4-bit binary can represent values from 0 to 15.

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

Why is binary representation preferred over BCD?

A

Binary representation is preferred because it allows a greater range of values for a given number of bits and simplifies calculations.

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

In which applications is BCD preferred?

A

BCD is preferred in business applications due to its maintenance of decimal rounding and precision.

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

What is packed decimal format used for?

A

Packed decimal format is used to represent real numbers, especially in business and financial applications, like dollars and cents.

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

What are the different methods for signed-integer representation?

A

The different methods for signed-integer representation include sign-and-magnitude, 1’s complement, and 2’s complement.

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

How does sign-and-magnitude representation work?

A

In sign-and-magnitude representation, the leftmost bit indicates the sign (0 for positive and 1 for negative), while the rest of the bits represent the magnitude.

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

What are the advantages and disadvantages of sign-and-magnitude representation?

A

Sign-and-magnitude representation has simpler conceptual understanding but requires complex algorithms for arithmetic operations.

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

What is the 9’s complement in decimal notation?

A

The 9’s complement is found by subtracting each digit of a number from 9.

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

How is the 9’s complement of a number calculated?

A

To calculate the 9’s complement, subtract the number from a base value made of 9’s (e.g., 999 for 3-digit numbers).

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

What is the 1’s complement in binary notation?

A

The 1’s complement in binary is obtained by inverting all the bits (changing 1’s to 0’s and vice versa).

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

How is the 1’s complement of a binary number found?

A

Invert each bit in the binary number to find the 1’s complement.

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

What are the properties of complementary representation?

A

Complementary representation does not need separate handling of the sign, making arithmetic consistent for positive and negative numbers.

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

Explain modular addition with 9’s complement.

A

Modular addition with 9’s complement involves adding numbers and adjusting by adding a carry if the result overflows the modulus.

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

What is end-around carry and when is it used?

A

End-around carry is used in modular arithmetic when the result has more digits than specified; the excess is added back to the result.

17
Q

What is overflow in binary arithmetic?

A

Overflow occurs when an arithmetic operation results in a number that exceeds the range allowed by the fixed number of bits.

18
Q

How is overflow detected in binary addition?

A

Overflow is detected if both inputs have the same sign but the result has a different sign.

19
Q

What are the two’s complement properties and usage?

A

Two’s complement uses the highest bit as the sign and supports straightforward arithmetic operations. It can be found by inverting all bits and adding 1.

20
Q

How do you find the two’s complement of an 8-bit number?

A

To find the two’s complement, invert the bits and add 1 to the least significant bit.

21
Q

What is the role of a carry flag in arithmetic operations?

A

The carry flag indicates when an operation produces a carry out of the most significant bit, signaling overflow.

22
Q

How do you perform floating-point addition and subtraction?

A

For floating-point addition, the exponents must be aligned, and the mantissas are then added or subtracted.

23
Q

What is normalization in floating-point arithmetic?

A

Normalization ensures the decimal point is in the correct position, maintaining the format’s precision.

24
Q

Describe the IEEE 754 standard for 32-bit floating-point representation.

A

The IEEE 754 standard defines 32-bit floating-point representation with 1 sign bit, 8 exponent bits, and 23 mantissa bits.

25
Q

How do you convert a base-10 number to binary floating-point format?

A

Convert the whole and fractional parts separately to binary and combine them into floating-point format.

26
Q

What is excess-N notation in floating-point representation?

A

Excess-N notation uses a middle value as an offset for representing exponents.

27
Q

What are the main differences between integer and real number computations?

A

Integer computations are simpler and faster than real number computations, but real numbers allow for fractional values and a wider range of magnitudes.

28
Q

Why might a program use packed decimal format in business applications?

A

Packed decimal format is used in business applications to maintain decimal precision in financial calculations.

29
Q

How do you detect overflow when adding two positive binary numbers?

A

Overflow in binary addition occurs if adding two positive numbers results in a negative number.

30
Q

What is the significance of the exponent in floating-point numbers?

A

The exponent indicates the power of the base and scales the mantissa in floating-point numbers.

31
Q

Explain the process of rounding in floating-point multiplication.

A

Rounding in floating-point multiplication adjusts the result to fit within the available precision.