cs33-2

cs33-2 - Bits and Bytes Bits and Bytes Chapter2ofB&O Why...

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

View Full Document Right Arrow Icon
its and Bytes Bits and Bytes Chapter 2 of B&O Some notes adopted from Bryant and O’Hallaron
Background image of page 1

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

View Full DocumentRight Arrow Icon
Why Don’t Computers Use Base 10? •Ba se 10 Number Representation – That’s why fingers are known as “digits” – Natural representation for financial transactions • Floating point number cannot exactly represent $1.20 ven carries through in scientific notation Even carries through in scientific notation • 1.5213 X 104 •Implementing Electronically –Ha rd to store •EN IAC (First electronic computer) used 10 vacuum tubes / digit – Hard to transmit • Need high precision to encode 10 signal levels on single wire essy to implement digital logic functions Messy to implement digital logic functions • Addition, multiplication, etc.
Background image of page 2
Binary Representations •Base 2 Number Representation – Represent 15213 10 as 11101101101101 2 – Represent 1.20 10 as 1.0011001100110011[0011]… 2 – Represent 1.5213 X 10 4 as 1.1101101101101 X 2 13 2 • Electronic Implementation asy to store with bistable elements Easy to store with bistable elements – Reliably transmitted on noisy and inaccurate wires 2.8V 3.3V 0 1 0 0.0V 0.5V
Background image of page 3

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

View Full DocumentRight Arrow Icon
Byte Byte-Oriented Memory Organization Oriented Memory Organization • Programs Refer to Virtual Addresses – Conceptually very large array of bytes – Actually implemented with hierarchy of different memory types – System provides address space private to particular “process” rogram being executed • Program being executed •P rog ram can clobber its own data, but not that of others •Compiler + Run Time System Control Allocation –Whe re different program objects should be stored –In any case, all allocation within single virtual address space
Background image of page 4
Encoding Byte Values •By te = 8 bits – Binary 00000000 2 to 11111111 2 –Dec ima l : 0 10 to 255 10 – Hexadecimal 00 6 to FF 0 0 0000 1 1 0001 2 2 0010 3 3 0011 100 16 16 •Base 16 number representation •Use characters ‘0’ to ‘9’ and ‘A’ to ‘F’ 4 4 0100 5 5 0101 6 6 0110 7 7 0111 000 •Wr ite FA1D37B 16 in C as 0xFA1D37B –O r 0xfa1d37b 8 8 1000 9 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111
Background image of page 5

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

View Full DocumentRight Arrow Icon
Machine Words • Machine Has “Word Size” – Nominal size of integer valued data • Including addresses –32 bit Systems (4 bytes) • Limits addresses to 4GB •Becom ing too small for memory intensive applications – 64 bit Systems (8 bytes) • Potentially address 1.8 X 10 19 bytes •x86 64 machines support 48 bit addresses: 256 Terabytes – Machines support multiple data formats • Fractions or multiples of word size •A lways integral number of bytes
Background image of page 6
Word Word-Oriented Memory Organization Oriented Memory Organization ddresses Specify Byte 0000 001 32-bit Words Bytes Addr. 64-bit Words ddr • Addresses Specify Byte Locations ddress of first byte in 0001 0002 0003 004 Addr = ? Addr = ?? 0000 000 – Address of first byte in word ddresses of successive 0004 0005 0006 0007 ??
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/15/2010 for the course CS 33 taught by Professor Rohr during the Spring '08 term at UCLA.

Page1 / 34

cs33-2 - Bits and Bytes Bits and Bytes Chapter2ofB&O Why...

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

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