CSE 30 -- Lecture 5 -- Oct 14


In this lecture, I announced the change in the cheating policy (see the class home page), went over the sample solution for assignment 1, and went over binary/hexadecimal representation, change of base in general, and the hex <-> binary conversion shortcut.

I was asked in class to convert 29.5 (decimal) to binary. It is 11101.1. The "." is called the binary point. You can see that this notation makes sense:

11101.1 base 2 = 1 * 24 + 1 * 23 + 1 * 22 + 0 * 21 + 1 * 20 + 1 * 2-1
               =  16    +   8    +   4    +   0    +   1    +  1/2
               =  29.5

Before we get too far ahead, note that this is not how floating point numbers are represented in machines. Rather, this is simply a mathematical notation. I will talk about floating point values later in the course.


[ CSE 80 | ACS home | CSE home | CSE calendar | bsy's home page ]
picture of bsy

bsy@cse.ucsd.edu, last updated Wed Oct 16 22:37:42 PDT 1996.

email bsy