% Week 07 Notes for DAT2343 - Winter 2011
% Ian! D. Allen - idallen@idallen.ca - www.idallen.com
% Winter 2011 - January to April 2011
Final Exam Schedule Posted
==========================
* The Final Exam date is posted on the [Course Home Page].
* For full mark credit, read [Test Instructions] for important
directions on how to enter your answers on the mark-sense forms.
Lecture Notes for This Week
===========================
From the Class Notes link on the Course Home Page
-------------------------------------------------
* [Assignment #07] - Floating Point, Endian, Shifts, Characters, Booleans
* [Assignment #06] - Submit midterm test corrections
* [030_binary_math.txt] -
Binary Integer Mathematics, unsigned, two's complement, etc.
* [040_overflow.txt] -
The CARRY flag and OVERFLOW flag in binary arithmetic
* [070_integer_encoding_practice.html] -
Integer Encoding Practice (including Z,C,S,O)
* [300_real_compile_link.txt] -
Real-World Compile, Assemble, and Link Example
* [301_LMC.html] -
The "Little Man" Computer
* [302_LMC_instruction_cycle.txt] -
The Little Man Computer Instruction Cycle
* [305_LMC_opcodes.html] -
Extended LMC Operation Codes - Opcodes
* [306_LMCProgramming.html] -
LMC Machine Level Programming
* [307_LMC_lights.txt] -
LMC Negative Flag Trickery
* [310_Comparison_of_the_LMC_and_General_Computer_Models.pps] -
* [310_Comparison_of_the_LMC_and_General_Computer_Models.ppt] -
* [350_LMC_sample1.txt] -
LMC Sample Program #1 - add and subtract
* [350_LMC_sample2.txt] -
LMC Sample Program #2 - input, add, output
* [360_LMC_Simulator.html] -
Clone of Son of LMC Simulator
* [361_LMC_Simulator_Usage.pps] -
* [361_LMC_Simulator_Usage.ppt] -
From Blackboard Course Documents
--------------------------------
These documents have restricted distribution and cannot be put on the
[Course Home Page].
* [01.ppt] - Introduction
- ignore the history sections
- vonNeumann architectures: the vonNeumann bottleneck
- CPU components
* [02.ppt] - Data Representation
- CPU Flags: slides 47-49, 53-54
- slide 54 has an error - change second-line 0100+0010 to be 0100+0110
* [03.ppt] - Boolean Algebra and Digital Logic
- Read: Boolean Algebra
- Ignore: Digital Logic
From the Internet
-----------------
*
* - convert to/from hexadecimal
From the Classroom Whiteboard/Chalkboard
----------------------------------------
* Your in-class notes go here.
* What you might need is a Binary Watch - see image.
![Binary Watch (photo courtesy of Lucas)](binary_watch.jpg)
* The six biggest misconceptions about IPv6:
* how many ASCII characters are there?
- what is the difference between 'A' and 'a'? 'M' and 'm'? 'Z' and 'z'?
* how many ASCII control characters (unprintable) are there?
- what are their hex values?
* bitwise operators: `AND OR XOR NOT` -> ` & | ^ ~ `
- a=6,b=3 what is `a&b`? what is `a|b`? what is `a^b`? what is `~a`?
- a=5,b=10 what is `a&b`? what is `a|b`? what is `a^b`? what is `~a`?
* ASCII parity bit, used to detect errors in data transmission
- is 'A' even or odd parity? convert it to even parity, then to odd
- is CR even or odd parity? convert it to even parity, then to odd
* vonNeumann architecture limitations (from 01.ppt)
- what is the vonNeumann bottleneck?
* basic CPU components (from 01.ppt)
* Carry and Overflow flags (continued)
- see the [Class Notes], above, and the 02.ppt slides, above
- The Overflow flag comes on when the answer is wrong for two's
complement (signed). The simple rule to remember is that
Overflow flag only turns on when pos+pos=neg or neg+neg=pos.
- For subtraction, note that subtracting a positive is the same math
as adding a negative, and subtracting a negative is the same math
as adding a positive:
- neg-pos = neg+neg and Result must also be negative (else Overflow)
- pos-neg = pos+pos and Result must also be positive (else Overflow)
- Adding two negatives must give a negative; adding two positives must
give a positive. Subtracting a positive from a negative must
generate a more negative number, not a positive number, and
subtracting a negative value from a positive number must give
a more positive number, not a negative number. (Otherwise: Overflow)
- The Carry flag indicates a Borrow when doing subtraction
of a big number from a smaller number, e.g. 2-3
* The Little-Man Computer
- see the [Class Notes], above
[Course Outline]: 2010-2011_DAT2343.pdf
[01.ppt]: http://blackboard.algonquincollege.com/
[02.ppt]: http://blackboard.algonquincollege.com/
[03.ppt]: http://blackboard.algonquincollege.com/
[05.ppt]: http://blackboard.algonquincollege.com/
[06.ppt]: http://blackboard.algonquincollege.com/
[Test Instructions]: 000_test_instructions.html
[000_README.txt]: 000_README.txt
[000_Licensing.txt]: 000_Licensing.txt
[005_this_is_your_brain.txt]: 005_this_is_your_brain.txt
[010_arithmetic_terms.txt]: 010_arithmetic_terms.txt
[020_operation_output_size.txt]: 020_operation_output_size.txt
[030_binary_math.txt]: 030_binary_math.txt
[040_overflow.txt]: 040_overflow.txt
[070_integer_encoding_practice.html]: 070_integer_encoding_practice.html
[120_CharacterEncoding.html]: 120_CharacterEncoding.html
[130_big_picture.txt]: 130_big_picture.txt
[300_real_compile_link.txt]: 300_real_compile_link.txt
[301_LMC.html]: 301_LMC.html
[302_LMC_instruction_cycle.txt]: 302_LMC_instruction_cycle.txt
[305_LMC_opcodes.html]: 305_LMC_opcodes.html
[306_LMCProgramming.html]: 306_LMCProgramming.html
[307_LMC_lights.txt]: 307_LMC_lights.txt
[310_Comparison_of_the_LMC_and_General_Computer_Models.pps]: 310_Comparison_of_the_LMC_and_General_Computer_Models.pps
[310_Comparison_of_the_LMC_and_General_Computer_Models.ppt]: 310_Comparison_of_the_LMC_and_General_Computer_Models.ppt
[350_LMC_sample1.txt]: 350_LMC_sample1.txt
[350_LMC_sample2.txt]: 350_LMC_sample2.txt
[360_LMC_Simulator.html]: 360_LMC_Simulator.html
[361_LMC_Simulator_Usage.pps]: 361_LMC_Simulator_Usage.pps
[361_LMC_Simulator_Usage.ppt]: 361_LMC_Simulator_Usage.ppt
--
| Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada
| Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/
| College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/
| Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/
[Plain Text] - plain text version of this page in
[Pandoc Markdown](http://johnmacfarlane.net/pandoc/) format