08-ibcm

08-ibcm - IBCM “Itty Bitty Computing Machine” Machine...

Info iconThis preview shows pages 1–12. 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

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: IBCM “Itty Bitty Computing Machine” Machine Language CS216: Program and Data Representation University of Virginia Computer Science Spring 2009 Aaron Bloomfield 2 CS216 Roadmap Data Representation Program Representation Bits 01001010 Addresses, Numbers, Characters 0x42381a, 3.14, ‘x’ Objects “Hello” Arrays [‘H’,’i’,\0] Python code High-level language C++ code Low-level language Virtual Machine language JVML Assembly x86 Real World Problems Real World Physics 3 Topics • Assembly language – What is it? – Why learn it? • Machine language (machine code) • Memory Hierarchy • Fetch-Execute cycle • Introduction to IBCM – Machine description – Instruction format 4 Assembly Language • Machine language – Instructions represented as patterns of bits (0s and 1s) that can be understood and processed by a central processing unit (CPU) – Program stored in main memory • Assembly language – Human-readable notation for the machine language used to control a specific computer architecture • Assembler translates to bits 5 Why Learn Assembly Language? • Machine designers • Compiler writers • Programmers (especially for OSes) • Assembly language programmers • Most importantly: It helps you understand how computers compute 6 Memory Hierarchy Main Memory Disk • CPU registers – 1 access per CPU cycle – 3*10^9 accesses per sec – 1 Kb total storage • Cache – SDRAM: 10 ns – 10^8 accesses per sec – Multiple levels possible • Higher levels are bigger/slower – 1 Mb total storage • Main memory – DRAM: 60 ns – 2*10^7 accesses per sec – Limited by bus speeds – 1 Gb total storage • Disk – HDD speeds: 5 ms – 200 accesses per sec – 1 Tb total storage 7 End of lecture on Mon, Mar 9 • Also went over slides 42-52 of 07-hashes 8 Fetch Execute Cycle while(power is on) { IR := memory[PC] Increment PC by length of instruction execute instruction in IR } PC = program counter IR = instruction register 9 Assembly Language Instructions • x86 add eax, ebx add ecx, 1 • Explicit use of registers • IBCM load 100 add 200 store 300 • Implied use of accumulator 10 Running IBCM programs • We have two options – Download the old IBCM emulator (from Collab) • The program is old (10+ years!) and clunky, and hard to install on modern versions of Windows – The new, fancy, online simulator • http://www.cs.virginia.edu/~cs216/ibcm • Mirrors: – http://gemini.cs.virginia.edu:8080/ibcm/ – http://lyra.cs.virginia.edu:8080/ibcm/ • This program will hang your browser if it gets stuck in an infinite loop, due to how web browsers handle threads and polling • We’ll see a demo of each 11 IBCM Machine Description (CPU) • Single accumulator – 16 bits • Special purpose registers – IR – instruction register • Stores bits which encode instruction – PC – program counter • Stores an address of an instruction 0 15...
View Full Document

{[ snackBarMessage ]}

Page1 / 46

08-ibcm - IBCM “Itty Bitty Computing Machine” Machine...

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

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