FlashKeepers

Programming Concepts · College · College and University

Numbers, Floating Point and Text Encoding

Two's complement, IEEE 754 floats, rounding error, endianness, ASCII, Unicode, UTF-8 and UTF-16.

About this set

42 basic cards for College Programming Concepts. It opens with "In two's complement, what does the most significant bit indicate?" and "To negate a number in two's complement, what two operations must you perform?". Study it alongside the other College sets below.

42 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

In two's complement, what does the most significant bit indicate?
Show answerThe sign: 0 for positive, 1 for negative
To negate a number in two's complement, what two operations must you perform?
Show answerInvert all bits, then add 1
What is the range of values representable in 8-bit two's complement?
Show answer-128 to 127
Why is two's complement used instead of sign-magnitude representation?
Show answerIt has only one zero representation and simplifies arithmetic operations
What is the two's complement representation of -1 in 8-bit binary?
Show answer11111111
What are the three fields in IEEE 754 single precision format?
Show answerSign, exponent, and significand (mantissa)
In IEEE 754 single precision, how many bits are allocated to the exponent field?
Show answer8 bits
In IEEE 754 single precision, how many bits are allocated to the significand?
Show answer23 bits, plus an implicit leading 1 for normalized numbers
What is the exponent bias in IEEE 754 single precision?
Show answer127
What does the significand field in IEEE 754 represent?
Show answerThe precision and significant digits of the floating point number
What does the exponent field in IEEE 754 represent?
Show answerThe power of 2 by which the significand is scaled
In IEEE 754, how is positive infinity represented?
Show answerExponent all 1s, significand all 0s, sign bit 0
In IEEE 754, how is NaN (Not a Number) represented?
Show answerExponent all 1s, significand non-zero
What is a denormalized number in IEEE 754?
Show answerA number with exponent all 0s, used to represent very small values closer to zero
In IEEE 754 double precision, how many total bits are used?
Show answer64 bits (1 sign, 11 exponent, 52 significand)

27 more cards in the app

Study this set free