slides - CSE360 1 CSE 360 Introduction to Computer Systems...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE360 1 CSE 360: Introduction to Computer Systems Course Notes Rick Parent ( [email protected] ) http://www.cse.ohio-state.edu/~parent Wayne Heym ( [email protected] ) http://www.cse.ohio-state.edu/~heym Copyright © 1998-2005 by Rick Parent, Todd Whittaker, Bettina Bair, Pete Ware, Wayne Heym CSE360 2 Information Representation 1 ◆ Positional Number Systems: position of character in string indicates a power of the base (radix). Common bases: 2, 8, 10, 16. (What base are we using to express the names of these bases?) – Base ten (decimal): digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 form the alphabet of the decimal system. ▼ E.g., 316 10 = – Base eight (octal): digits 0, 1, 2, 3, 4, 5, 6, 7 form the alphabet. ▼ E.g., 474 8 = CSE360 3 Information Representation 2 – Base 16 (hexadecimal): digits 0-9 and A-F. ▼ E.g., 13C 16 = – Base 2 (binary): digits (called “ bits ”) 0, 1 form the alphabet. ▼ E.g., 100110 = – In general, radix r representations use the first r chars in {0…9, A. ..Z} and have the form d n-1 d n-2 … d 1 d . Summing d n-1 × r n-1 + d n-2 × r n-2 + … + d × r will convert to base 10. Why to base 10? CSE360 4 Information Representation 3 ◆ Base Conversions – Convert to base 10 by multiplication of powers ▼ E.g., 10012 5 = ( ) 10 – Convert from base 10 by repeated division ▼ E.g., 632 10 = ( ) 8 – Converting base x to base y : convert base x to base 10 then convert base 10 to base y CSE360 5 Information Representation 4 – Special case: converting among binary, octal, and hexadecimal is easier ▼ Go through the binary representation, grouping in sets of 3 or 4. ▼ E.g., 11011001 2 = 11 011 001 = 331 8 11011001 2 = 1101 1001 = D9 16 ▼ E.g., C3B 16 = ( ) 8 CSE360 6 Information Representation 5 ◆ What is special about binary? – The basic component of a computer system is a transistor (tran sfer re sistor): a two state device which switches between logical “1” and “0” (actually represented as voltages on the range 5V to 0V). – Octal and hexadecimal are bases in powers of 2, and are used as a shorthand way of writing binary. A hexadecimal digit represents 4 bits, half of a byte. 1 byte = 8 bits. A bit is a b inary dig it . – Get comfortable converting among decimal, binary, octal, hexadecimal. Converting from decimal to hexadecimal (or binary) is easier going through octal. CSE360 7 Information Representation 6 Binary Hex Decimal Binary Hex Decimal 0000 1000 8 8 0001 1 1 1001 9 9 0010 2 2 1010 A 10 0011 3 3 1011 B 11 0100 4 4 1100 C 12 0101 5 5 1101 D 13 0110 6 6 1110 E 14 0111 7 7 1111 F 15 CSE360 8 Information Representation 7 ◆ Ranges of values – Q: Given k positions in base n , how many values can you represent?...
View Full Document

{[ snackBarMessage ]}

Page1 / 232

slides - CSE360 1 CSE 360 Introduction to Computer Systems...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online