-
Notifications
You must be signed in to change notification settings - Fork 0
feat(num-rep): release #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
lethalNeutrino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left mostly formatting issues with 1-2 content things that I have opinions on, but content is up to Lisa's discretion
| format. | ||
| ::: | ||
|
|
||
| 4. How many numbers can be represented by an unsigned, base-4, $n$-digit number. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change . to ?
| **C.** | ||
| ::: | ||
|
|
||
| 5. How many bits are needed to represent decimal number 116 in binary? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the decimal number and/or 116 ->
| 5. How many bits are needed to represent decimal number 116 in binary? | ||
|
|
||
| ::: {.callout-note title="Answer" collapse="true"} | ||
| **7 bits**. $(116)_{10} =$ `0b111 0100` or $log{_2}{116} \approx 6.85$ which we round to 7 bits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log =>
|
|
||
| (a) We can write the value of an $n$-digit two's complement number as | ||
| $$ | ||
| \sum_{i=0}^{n-2} 2^i d_i - 2^{n-1} d_{n-1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use smth less confusing here like -2^n(d_n) + \sum... (same as unsigned but up to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Propagate change to examples below too
| $$ | ||
| which is very similar to unsigned numbers. | ||
|
|
||
| (d) To negate a two's complement number: flip all the bits and add 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel like i would put an example here, but up to Lisa's discretion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have an example from discussion slides that we use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so
| ## Precheck | ||
| If we have an $n$-digit unsigned numeral $d_{n-1}$ $d_{n-2}$...$d_0$ in radix (or base) $r$, then the value of that numeral is: | ||
| $$ | ||
| \sum_{i=0}^{n-1} r^i d_i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for example, but up to Lisa discretion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have an example from discussion slides that we use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

First draft of number rep section, unsigned and signed