% Author: Ian! D. Allen - idallen@idallen.ca - www.idallen.com % Date: Winter 2011 - January to April 2011 - Updated 2020-11-12 14:48 EST % Title: Week 02 Notes for CST8281 - Winter 2011 - [Course Home Page] - [Course Outline] - [All Weeks] - [Plain Text] First Midterm Test ================== Calculators are not permitted during the first midterm test. You will benefit from knowing the powers of two from 2\^(-4) to 2\^16 and the decimal and binary values of the hexadecimal digits from zero to fifteen. Of course you can work them out; however, having at least some of them memorized will make things go faster for you on the test. (Remember that hexadecimal “A” = decimal 10 = binary 1010.) Lecture Notes for This Week =========================== From the Class Notes link on the Course Home Page ------------------------------------------------- - [Course Home Page] - [All Weeks] - [010_arithmetic_terms.txt] - Basic Arithmetic Operations Terminology - [020_operation_output_size.txt] - Size needed for output of ADD and MULTIPLY - [030_binary_math.txt] - Binary Integer Mathematics, unsigned, two’s complement, etc. - [060_different_binary_integers.html] - Representation for 4-bit Signed Integers in Different Systems - FunnyMath0.java - a program that produces unexpected incorrect results From Blackboard Course Documents -------------------------------- These documents have restricted distribution and cannot be put on the [Course Home Page]. - [01.ppt] - Introduction (vonNeumann, prefixes, reciprocal) - [02.ppt][01.ppt] - Data Representation - omit “Booth’s algorithm” slides 50-52 - ignore slides 63-70 (the “simplified” model) - slide 72 is wrong: IEEE 754 +0.0 is equal to -0.0 - ignore slides 75-76 (floating-point multiplication) - use my web pages and assignments instead for floating-point info - you do not need to know how to do math with sign-magnitude numbers - you do need to know how to convert them to/from decimal - you do not need to know how to do math with one’s complement numbers - you do need to know how to convert them to/from decimal - you need to know how to do addition with two’s complement numbers - you also need to know how to convert them to/from decimal - you do not have to multiply or divide or subtract any binary numbers - omit most of the math in 2.8 “Error Detection and Correction” - omit slides 94-100 - omit slides 103-115 From the Internet ----------------- - - - - - - - - - - - - - “odometer math”, showing the number ring: - Notes on Binary Numbers, Arithmetic, and Radix Conversions: - Converting hex to decimal using bit flipping and adding one: - Base Converter: Convert numbers in any base up to 32: - Hex (only) to decimal and binary converter, and vice-versa: - - - A 1965 song about doing math in Base 8 (I was 11 at the time): From the Classroom Whiteboard/Chalkboard ---------------------------------------- - Your in-class notes go here. ### Overflow causes rocket to self-destruct - - > “a data conversion from a 64-bit floating point to 16-bit signed integer > value caused a hardware exception (more specifically, an arithmetic > overflow, as the floating point number had a value too large to be > represented by a 16-bit signed integer)” -- | 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] format [Course Home Page]: .. [Course Outline]: 2010-2011_CST8281.pdf [All Weeks]: indexcgi.cgi [Plain Text]: week02notes.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 [060_different_binary_integers.html]: 060_different_binary_integers.html [01.ppt]: http://blackboard.algonquincollege.com/ [Pandoc Markdown]: http://johnmacfarlane.net/pandoc/