CSC207H1 Lecture : nov28c.docx

56 views5 pages
11 Jan 2013
School
Course
Professor

Document Summary

Representing numbers: it all makes sense if you understand how real numbers are represented, first, consider an int like 42. Hardware doesn"t directly represent 4s or 2s -- everything is binary: so 42 can be represented by 101010 (base 2). Of course, the binary digits are represented electromagnetically. Representing fractions: fractions can be handled using the same approach, so 0. 4375 can be represented by using 0. 0111 (base 2, another example. Problem numbers: you already know from math that some numbers do not have a finite representation, even worse, some numbers that have a finite representation in decimal do not in binary, we have finite memory. But we need to represent numbers that take an infinite number of bits. Ieee-754 floating point: like a binary version of scientific notation, 32 bits for a float as follows: (and 64 bits for a double) 1 bit for the sign: 1 for negative and 0 for positive.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents