Skip to content

Commit 25b4838

Browse files
committed
all the old stuff
1 parent 37a346f commit 25b4838

File tree

12 files changed

+486
-14
lines changed

12 files changed

+486
-14
lines changed

_practice/2022-11-07.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1. In `floatexpt.md` design an experiment using the `fractions.Fraction` class in python that shows helps illustrate how `.1*3 == .3` evaluates to `False` but `.1*4 ==.4` evaluates to `True`. (practice/review)
2+
3+
```{index} floatexpt.md
4+
```

_practice/2022-11-16.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1. Pick a component that is in the more detailed von Neumann that we did not discuss in detail and contribute to your group repo. Coordinate with your team so that each contribution is a different component.
2+
1. Map out what you know about computer hardware in some form of visual or outline in `hardwaremap.md` and bring three questions to class.
3+
```{index} hardwaremap.md
4+
```

_prepare/2022-11-07.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{index}
2+
```

_prepare/2022-11-16.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```{index} systemsabstractions.md
2+
```
3+
1. Read about [systems abstractions](https://cacm.acm.org/opinion/articles/259395-systems-abstractions/fulltext) in CACM. Answer reflection questions below:
4+
```
5+
1. How many of these are familiar/not?
6+
1. How has you undertanding of these changed during this course.
7+
1. Do you think you understand this article more now than you would have at the beginning of the semester
8+
1. Write 3 questions and their answers that could be a quiz to see if someone understood or had misconceptions about the abstractions in this article.
9+
```
10+
1. Study the components of a computer system that we learned today from the diagrams. Bring questions to class

_review/2022-11-07.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```{index} cdouble.md
2+
```
3+
Write a C program to compare values as doubles and as float (single precision/32bit) to see that this comparison issue is related to the IEEE standard and is not language specific. Make notes and comparison around its behavior and include it in a code cell in `cdouble.md`

_review/2022-11-16.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1. Learn about the history of some programming *practice* or the history of a term (eg why debugging is called debugging) and contribute them to a history.md file in your team repo. Be sure to include your sources and make sure to use a trustworthy source. Review a team mate's contribution. (see notes for guidance)

activities/practice.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ Activities:
160160
Activities:
161161
```{include} ../_practice/2022-11-02.md
162162
```
163+
## 2022-11-07
164+
165+
[related notes](../notes/2022-11-07)
166+
167+
Activities:
168+
```{include} ../_practice/2022-11-07.md
169+
```
163170

164171
## 2022-11-14
165172

@@ -168,3 +175,11 @@ Activities:
168175
Activities:
169176
```{include} ../_practice/2022-11-14.md
170177
```
178+
179+
## 2022-11-16
180+
181+
[related notes](../notes/2022-11-16)
182+
183+
Activities:
184+
```{include} ../_practice/2022-11-16.md
185+
```

activities/prepare.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,26 @@ Activities:
190190
```{include} ../_prepare/2022-11-02.md
191191
```
192192

193+
## 2022-11-07
194+
195+
[related notes](../notes/2022-11-07)
196+
197+
Activities:
198+
```{include} ../_prepare/2022-11-07.md
199+
```
200+
193201
## 2022-11-14
194202

195203
[related notes](../notes/2022-11-14)
196204

197205
Activities:
198206
```{include} ../_prepare/2022-11-14.md
199207
```
208+
209+
## 2022-11-16
210+
211+
[related notes](../notes/2022-11-16)
212+
213+
Activities:
214+
```{include} ../_prepare/2022-11-16.md
215+
```

activities/review.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,27 @@ Activities:
185185
```{include} ../_review/2022-11-02.md
186186
```
187187

188+
189+
## 2022-11-07
190+
191+
[related notes](../notes/2022-11-07)
192+
193+
Activities:
194+
```{include} ../_review/2022-11-07.md
195+
```
196+
188197
## 2022-11-14
189198

190199
[related notes](../notes/2022-11-14)
191200

192201
Activities:
193202
```{include} ../_review/2022-11-14.md
194203
```
204+
205+
## 2022-11-16
206+
207+
[related notes](../notes/2022-11-16)
208+
209+
Activities:
210+
```{include} ../_review/2022-11-16.md
211+
```

notes/2022-11-02.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,23 @@ exit()
408408

409409

410410
## Questions
411+
412+
413+
### How does byte(bytearray(<num>) work?
414+
415+
It casts it to a bytearray then a bytes object. [see the docs](https://docs.python.org/3/library/stdtypes.html#binary-sequence-types-bytes-bytearray-memoryview)
416+
417+
### What are the '&' and '|' operators used for?
418+
419+
They're occasionally used for calculating things if highly compressed, otherwise they are used
420+
421+
### What do you mean by "ones compliment"?
422+
423+
This is ont type of representation for negative numbers in binary. In ones complement, we flip all of the bits. The first bit is always the indicator for a negative or positive number. So, if we want to represent negative thirteen in eight bits we would start with thirteen: 00001101 then flip all fo the bits to get 11110010. If we were to read this number, we would know that this is a negative number because the first digit is a 1, so to figure out the value, we would flip all of the bits back and get 00001101.
424+
425+
In any notation where the first bit is the sign, the highest number we can represent is reduce in favor of representing both positive and negative numbers. That is, if we drop to four bits instead of being able to have 1111 be the highest number: 15 and 0000 be the lowest number: 0. The highest number would be 0111 = 7, and the lowest will be 1000 = -7.
426+
427+
Two's complement flips the bits and adds one. This is more commonly used because we can represent a large range of numbers.
428+
```{tip}
429+
Comparing these is a good deeper Exploration
430+
```

0 commit comments

Comments
 (0)