CS 230 - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

CS 230

Description:

Architecture of the CPU: - control unit (CU), decodes instructions and initiates their execution; - arithmetic/logic unit (ALU), performs arithmetic and logic ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 9
Provided by: mcg29
Category:
Tags: decodes | keypad

less

Transcript and Presenter's Notes

Title: CS 230


1
CS 230
  • HP 15C A Stack Calculator

2
High Level Languages
  • C
  • Java
  • Basic
  • Cobol
  • Fortran
  • Pascal
  • Algol

3
Machine Languages
  • Every CPU has its own machine language
  • Commands are numbers
  • CPU (Machine) does not understand High-Level
    Languages!

4
Example HP 15C
Architecture of the CPU - control unit (CU),
decodes instructions and initiates their
execution - arithmetic/logic unit (ALU),
performs arithmetic and logic operations -
registers, provides the storage workspace needed
for manipulating data.
5
User Interface - keypad, used for inputting
data and commands - display, used for output
of results
6
Sample Program
5 enter 2 /
Result displayed will be 2.5
7
Reverse Polish Notation
  • Operands are entered first, followed by operators
  • Uses a stack to keep track of operands and
    intermediate results
  • Final result is the value on the top of the stack
    when the operation is completed

8
Sample Program Revisited
In machine language, the previous program would
be
5 (alternatively, 28) 36 2 (alternatively, 38) 10
Write a Comment
User Comments (0)
About PowerShow.com