binary

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

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:44 PM on 1/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards

signed magnitude pros

  • simple and intuitive representation

  • easy to convert unsigned values to signed positive numbers (just add 0 as sign bit)

2
New cards

signed magnitude cons

  • sign bit makes it difficult to do arithmetic

  • 2 representations of 0, makes no sense

3
New cards

ones complement pros

easy to perform addition so simple circuits

4
New cards

ones complement cons

2 representations of 0

5
New cards

twos complement pros

  • no special bits so simple circuits

  • single representation of 0

6
New cards

2 reasons why computers use binary

  1. computers use transistors which only have 2 states

  2. efficient for boolean computational logic

7
New cards

decimal to ones complement method

  1. decimal to unsigned binary

  2. extend bits if needed

  3. flip bits

8
New cards

ones complement to decimal method

  1. if MSB if 1, flip bits

  2. unsigned binary to (negative) decimal

9
New cards

decimal to twos complement method

  1. decimal to unsigned binary

  2. if decimal was negative, flip bits + add 1

10
New cards

twos complement to decimal method

  1. if MSB = 1, flip bits + add 1

  2. unsigned binary to decimal

11
New cards

maximum/minimum for unsigned binary

minimum = 00000000 = 0

maximum = 11111111 = 255

12
New cards

maximum/minimum for signed binary

minimum = 11111111 = -127

maximum = 01111111 = 127

13
New cards

maximum/minimum for ones complement

minimum = 1 0000000 = -127

maximum = 0 1111111 = 127

14
New cards

maximum/minimum for twos complement

minimum = 10000000 = -128

maximum = 01111111 = 127

15
New cards

signed magnitude addition method

  • if operands have same sign, add magnitudes and keep bit

  • else large operand - small operand and choose sign bit of larger magnitude operand

16
New cards

signed magnitude subtraction method

  1. rearrange -b to +b by changing sign bit

  2. if operands have same sign post change, add

  3. else large operand - small operand with final answer sign same as large operand

17
New cards

signed multiplication/division method

perform as unsigned, if operands have same signs then keep, else pick from larger operand

18
New cards

ones complement addition overflow

end carry around

19
New cards

twos complement addition overflow

discard excess carry bits

  • if final carry bit is not same as last answer bit, overflow is detected

20
New cards

ones/twos complement multiplication/division method

  1. convert both operands to be positive

  2. perform as unsigned

  3. convert to negative is operands had different signs

21
New cards

IEEE-754 single precision format

32 bits

  • sign bit + 8 bit exponent + 23 bit significand

  • 127 bias

22
New cards

IEEE-754 double precision format

64 bits

  • sign bit + 11 bit exponent + 52 bit significand

  • 1023 bias

23
New cards

IEEE-754 single precision to decimal method

  1. calculate exponent by exponent - bias

  2. add leading 1 to significand (1.significand)

  3. move floating point as per exponent, calculate and add sign

24
New cards

decimal to IEEE-754 single precision method

  1. convert to unsigned binary

  2. normalise and find exponent

  3. set sign bit

25
New cards

0, infinity and not a number special values for IEEE-754

0: 0/1 00000000 000…

infinity: 0/1 11111111 000…

not a number: 0 11111111 any significand

26
New cards

IEEE-754 addition method

  1. adjust floating point so significands have same exponent (2^0)

  2. if different signs, add significands else subtract

  3. renormalise if needed and pick sign

27
New cards

IEEE-754 multiplication method

  1. add decimal exponents

  2. multiply significands

  3. renormalise and set exponent

  4. select sign

28
New cards

IEEE-754 division method

  1. subtract decimal exponents

  2. divide significands

  3. renormalise and set exponent

  4. select sign

29
New cards

overflow/underflow in IEEE-754

overflow: exponent > 128

underflow: magnitude too close to 0 to be distinguished from it