Difference between revisions of "CSC103: DT's Notes 1"
Line 763: | Line 763: | ||
* Arithmetic operations in binary can be expressed using the operators of the boolean algebra. | * Arithmetic operations in binary can be expressed using the operators of the boolean algebra. | ||
+ | {| style="width:100%; background:#FFC340" | ||
+ | |- | ||
+ | | | ||
+ | =Computer Simulator= | ||
+ | |} | ||
+ | <br /> | ||
+ | {| style="width:100%; background:#FFD373" | ||
+ | |- | ||
+ | | | ||
+ | ===Playing A Game=== | ||
+ | |} | ||
+ | Let's assume that we want to play a simple game of ''coding''. The game is simple: we want two people to have a conversation where each word or sentence that they can say is limited to a small set of preselected sentence, and each one is associated with a number. When the two people talk to each other, they must pick the number corresponding to the sentence, question, or answer they want to say. | ||
+ | Here's a list of numbers and their associated sentences: | ||
+ | <code><pre> | ||
+ | 00 Really? | ||
+ | 01 Hello 00 No | ||
+ | 02 How are you? 01 Yes | ||
+ | 03 Did you enjoy... 02 Good | ||
+ | 04 Was it good? 03 Bad | ||
+ | 05 Have you finished... 04 A tiny bit | ||
+ | 06 Do you like... 05 A lot | ||
+ | 06 Homework | ||
+ | 07 Wiki | ||
+ | 08 Apples | ||
+ | 09 Cereals | ||
+ | 10 Bugs | ||
+ | 11 Breakfast | ||
+ | 12 PC Lab | ||
+ | 13 Hello! | ||
+ | |||
+ | </pre></code> | ||
+ | Now, you'll figure out quickly what the following two people are saying:<br /> | ||
+ | — 01 02<br /> | ||
+ | — 02 <br /> | ||
+ | — 03 06 <br /> | ||
+ | — 01 05 <br /> | ||
{| style="width:100%; background:#FFC340" | {| style="width:100%; background:#FFC340" |
Revision as of 19:18, 3 October 2012
--© D. Thiebaut 08:10, 30 January 2012 (EST)