Things to Know T1&2 Midterm 1

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:02 AM on 10/18/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

13 Terms

1
New cards

How do you convert to 1’s complement?

Just the complement

2
New cards

How do you convert to 2’s

Take complement and add 1

3
New cards

With 2’s complement, what is the leftmost bit?

Negative weight

4
New cards

How do you compute an IEEE 754 Standard for Single Precision (32bit) Floating Point?

1st bit = sign (S)

next 8 bits = exponent (E)

next 23 bits = fraction (F)

number = (-1)S * 1.F * 2E-127 (the bias is 2k-1-1 (for 8 byte (32bit) = 127)

Example: 1 1000001 01000000000000000000000

S = 1

E = 12910

F = 0.012 = 0.25

(-1)1 × 1.25 × 22 = -5.0

5
New cards

What happens when you put a smaller signed number into a bigger signed number?

Sign extension

6
New cards

In hex what is A?

10

7
New cards

Big endian vs little endian? What is x86 32bit?

Big = MSB leftmost — 0xE9 = 2^8 × 14 + 2^0 × 9

little = MSB rightmost — 0xAE9 = 2^16 × 9 + 2^8 × 14 + 2^0 × 10


Little Endian

8
New cards

When does overflow happen?

Signed — sum exceeds 127 or goes below -128

Unsigned — sum exceeds 255

9
New cards

When does underflow happen?

Unsigned — sum goes below 0

10
New cards

When you add bits, what does 2 in a column mean?

Column becomes 0 and add a 1 to the left column

01

01 += 10

11
New cards

How do you get the negative of a number in binary?

Take it’s positive and run 2’s complement

12
New cards

What is arithmetic shift? Logical shift?

Arithmetic = sign extension (based on MSB)

Logical = always 0s (cuz unsigned)

13
New cards

What does echo do Linux? Grep?

Display line of text

Print lines matching pattern