Data Representation

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

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

binary number system

  • uses 2 as the radix

  • employs two binary digits: 0 and 1

  • can rep any number using the positional notation

  • the MOST SIGNIFICANT BIT (MSB) is the leftmost bit of a binary number

  • the LEAST SIGNIFICANT BIT (LSB) is the rightmost bit of a binary number

2
New cards

radix

the “base” of the number system (ex: for binary, the radix = 2)

3
New cards

positional notation

see “Summary of Chapter 3” notes, page 1

4
New cards

converting from decimal to binary (fractional part and the whole number part)

see “Summary of Chapter 3” notes, page 1, 2

5
New cards

convert from decimal to hexadecimal

same process as converting decimal to binary except you keep dividing by 16 instead of 2

  • see “Summary of Chapter 3” notes, page 1

6
New cards

convert from decimal to octadecimal 

same process as converting decimal to binary except you keep dividing by 8 instead of 2

  • see “Summary of Chapter 3” notes, page 1

7
New cards

converting from hexadecimal to binary (& vice versa)

see “Summary of Chapter 3” notes, page 2

8
New cards

converting from octadecimal to binary (& vice versa)

see “Summary of Chapter 3” notes, page 3

9
New cards

two ways to represent binary numbers

  1. unsigned numbers → always non-negative (>= 0)

  2. signed numbers → can be either negative or non-negative and it’s indicated by the SIGN BIT (the MSB) where 0 = non-negative num and 1 = negative num

10
New cards

domain of UNSIGNED binary numbers

[0, (2^n) - 1] with n = max number of bits

EX. if max num of bits (n) = 4, then the domain is 0 to (2^4)-1 (0 to 15) and overflow occurs when the result of an operation (such as addition) is outside of that domain.

11
New cards

complements

  • in digital computers, complements are mainly used to rep neg nums

  • there are 2 types of complements for each base system:

    • (r - 1)’s comp

    • r’s comp

    • for instance, for base 2 (the binary sys), there are 2’s comp and 1’s comp representation

12
New cards

to find the 2’s complement and 1’s complement of a binary num

see “Summary of Chapter 3” notes, page 4

13
New cards

how to detect overflow when adding signed bits

  • when performing addition of two non-negative numbers, the result has a sign bit of 1 (1 = neg num, which wouldn’t make sense)

  • when performing addition of two negative nums, the result has a sign bit of 0 (0 = non-neg num, which wouldn’t make sense since neg + neg cannot equal a pos num)

  • if the operands have the same sign bit, then the expression [MSB of the result] xor [next-MSB of the result] determines whether you had overflow

  • if the operands have diff sign bits, then use the expression [carry-in of the MSB of the result] xor [carry-out of the MSB of the result]

14
New cards

BCD

binary bits are in groups of 4

ex. 0010 = 2

15
New cards

floating point representation

see “ Summary of Chapter 3” notes, page 5

16
New cards

converting a decimal num to a binary num in floating point rep

see '“Summary of Chapter 3” page 6

17
New cards

converting a binary num in floating point rep to a decimal num

see “Summary of Chapter 3” page 7

18
New cards

IEEE 754 standard for representing floating point numbers

see “Summary of Chapter 3” page 5

19
New cards

the rule for the exponent part of a floating point num (32 bits)

e - 127 = exp

where:

e = the number expressed in binary in the register reserved for the exponent

exp = the actual exponent