Complete HW2 and HW3

This commit is contained in:
Blizzard Finnegan 2023-11-15 10:48:30 -05:00
parent 09d0c36d19
commit 5c17d6811c
Signed by: blizzardfinnegan
GPG key ID: 61C1E13067E0018E
3 changed files with 42 additions and 4 deletions

View file

@ -10,7 +10,7 @@
| `0001`| s.0.3 | 0.125 |
| `1000`| s.4.0 | -8 |
| `1110`| u.1.3 | 1.75 |
| `1110`| s.1.2 | x |
| `0x7fff`| s.0.15 | x |
| `0x8000`| x | -1 |
| `0x3fff`| s.5.10 | x |
| `1110`| s.1.2 | -1.5 |
| `0x7fff`| s.0.15 | 0.999969482421875 |
| `0x8000`| s.0.15 | -1 |
| `0x3fff`| s.5.10 | 15.9990234375 |

38
homework3/homework3.md Normal file
View file

@ -0,0 +1,38 @@
# Hardware Description Language
# Homework 3
## Blizzard Finnegan
Author's note:
All answers here are using the SI standard prefixes (that is, multiples of 1000). For more information, please see the [linked article](https://en.wikipedia.org/wiki/Binary_prefix).
1. An average audio CD can contain 650MB of data. Given that the audio is stored *in stereo* 16-bit samples at a rate of 44100Hz, how many minutes of audio can a CD contain?
$$
stereo=\frac{2\times bits}{sample}\\
\frac{32 bit}{1sample}\times\frac{44100sample}{1sec}\times\frac{650MB}{1 disc}\times\frac{1byte}{8bit}\\
\frac{1sample}{4B}\times\frac{1sec}{44100sample}\times\frac{650MB}{1 disc}\times\frac{1000kB}{1MB}\times\frac{1000B}{1kB}=\frac{3684sec}{disc}\\
3684sec \approx1h, 1min, 24sec
$$
2. It takes 10 bits to encode an **nxm** memory, where m is 8 bits. What is the size of the memory?
10 bit address size: $2^{10}=1024$addresses
Each address contains 8 bits (1byte).
Total memory contains 8096 bits, or 1024 bytes. This is 1.024kB or 1KiB.
3. How many bits does it take to encode a memory that contains 1 second of a mono, 16-bit audio snippet sampled at 8000 Hz?
$$
\frac{16bit}{sample}\times\frac{8000sample}{sec}\times\frac{1sec}{1}=128000bit\\
128kbit\ or\ 16kByte
$$

BIN
homework3/homework3.pdf Normal file

Binary file not shown.