TongLecture2

# TongLecture2 - CS281 Lecture 2 Tuanjie Tong Review: Convert...

This preview shows pages 1–7. Sign up to view the full content.

CS281 Lecture 2 Tuanjie Tong

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Review: Convert decimal fractions to binary • (10.625) 10 ->(?) 2 We convert the integer part and fraction part separately. But how shall we convert the fraction part to binary (fraction)?
Convert fraction to binary Look at the general representation again: • D=(d m-1 d m-2 …d 1 d 0 d -1 d -2 …d -n ) r =d m-1 r m-1 +d m-2 r m-2 …+d 1 r 1 +d 0 +d -1 r -1 +…d -n r -n So, instead of dividing the fraction part by r (2 in the case of binary), we will multiply it by r at each step.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Review: Hexadecimal Contains 16 digits (as opposed to 2 in binary, 10 in decimal). 0, 1, . .., 9, A, B, C, D, E, F A is equal to decimal 10 F is equal to decimal 15 A5 in hexadecimal = A * 16 + 5 * 1 = 10 * 16 + 5 = 165 decimal. So why represent binaries using hexadecimal ? Why not say decimal or some other format ?
Review:Exercise Convert these binary numbers to hexadecimal: 10100110 1110101001 101100111

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Subtraction 1001010+1110101=? 111111+111=?
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/22/2008 for the course CS 281 taught by Professor Tong during the Spring '08 term at University of Missouri-Kansas City .

### Page1 / 16

TongLecture2 - CS281 Lecture 2 Tuanjie Tong Review: Convert...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online