Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Machine Language - Computer Organization and Design - Lecture Slides, Slides of Computer Aided Design (CAD)

The digital system design, is very helpful series of lecture slides, which made programming an easy task. The major points in these laboratory assignment are:Machine Language, Assembly Language, Machine Code, Set of Bits, Instruction Encoding, Mapping of Assembly Instructions, Instruction Set Architecture, Instruction Formats, Register Values, Immediate Values

Typology: Slides

2012/2013

Uploaded on 04/24/2013

baijayanthi
baijayanthi 🇮🇳

4.5

(13)

171 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Machine Language
Apps
O/S
Arch
mArch
Logic
Digital
Analog
Devices
Physics
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Machine Language - Computer Organization and Design - Lecture Slides and more Slides Computer Aided Design (CAD) in PDF only on Docsity!

Machine Language

Apps O/S Arch mArch Logic Digital Analog Devices Physics

Assembly Language  Computer?

  • A computer, at its most basic level, needs instruction using a set of bits.
  • How do we translate concepts such as “add” into a language the computer understands (machine code)?

Instruction Formats

  • In every architecture, there is a set of basic formats that most of their instructions follow.
  • In LC2K7, for example:
    • R-type instructions (Register type – and, nand)
    • I-type instructions (Immediate type – lw, sw, beq)

Instruction Encodings

  • In order to construct these instructions, we need to translate the information in an assembly statement.
  • Opcode : encoded as special codes for each operation
    • add (000), nand (001), lw (010), sw (011), beq (100), jalr (101), halt (110), noop (111)
  • Register Values : Just encode the register number
    • r2 = 010 , etc.
  • Immediate Values : Just encode the value
    • remember to fill up the allotted bits!

Encoding Example

lw 5 2 -

Instruction Encoding Regularity

  • Instruction set architecture also defines the mapping of assembly instructions to machine code add 1 2 3

Encoding – Your Turn, part II

  • Compute the encoding (give the hex) for:
    • beq 3 4 top (opcode for beq is 100)
    • The beq is on line 217
    • The label top appears on line 222