程序代写 RESIT TUTORIALS COMPUTER ARCHITECTURE PART

RESIT TUTORIALS COMPUTER ARCHITECTURE PART
Dr. BONG-HWAN OH School of Internet of Things

Copyright By PowCoder代写 加微信 powcoder

CHAPTER 1: BOOLEAN LOGIC
You need to understand Boolean algebra and Gate Logic – Basic of Basics
– Need to be familiar with the bit operation!

BOOLEAN OPERATION (FUNCTION): AN EXAMPLE
Truth table representation : the simplest way to specify a Boolean function
– specify all the possible values of the function’s input variables along with the function’s output for each set of inputs.
F(x,y,z)= 𝑥+𝑦𝑧

BOOLEAN OPERATION (FUNCTION): AN EXAMPLE
Can we make a boolean expression using a Truth table??YES. HowTo
– Focus on all the rows in which the function has value 1. (red) – construct a term to make a value 1 by ‘And’ operation
– we ‘Or-together’ all these terms
= 𝑥ҧ𝑦𝑧ҧ+𝑥𝑦ത𝑧ҧ +𝑥𝑦𝑧ҧ

EXAMPLE OF LOGIC DESIGN
AND operation (1)
ത AND operation (2) Xor (a,b) = 𝑎𝑏 + 𝑎ത𝑏
OR operation (3)

CHAPTER 2: BOOLEAN ARITHMETIC
You need to understand Boolean Arithmetic (calculation)
• You need to know how to change decimal numbers to binary
• positive numbers
• negative numbers (2’s complement method, we studied at
Binary subtraction)

BINARY NUMBER:
DecimalBinary (positive numbers) 6ten =????two
6ten= 4 +2
= 1*22 + 1*21 + 0*20
= 1 1 0 two 1

BINARY NUMBER:
DecimalBinary (negative numbers)
For the details, review 2’s complement method
In the example, the number of bit for this calculation is 4
6ten = 110two -6ten = ????
6ten = 0 1 1 0 two 6ten = 1001two
0. Represent the number by 4 binary bits 1. Flip all the bits(1001)
6ten = 1 0 0 1 + 0 0 0 1 2. Add 1 the results(0001). = 1010

Chapter 3 and 4

CHAPTER 3: SEQUENTIAL LOGIC
• This chapter is the background knowledge to understand the memory operation.
• Please understand the concept of how to store bit information in computer systems.

CHAPTER 4: INTRODUCTION TO MACHINE LANGUAGE
The purpose of this chapter is to understand what is machine language conceptually.
We studied the practical examples (MIPS) at Chapter 5.

• To control a computer’s hardware, you must speak its language
– The words of a computer’s language are called instructions – its vocabulary is called an “instruction set”
• Our example: MIPS
– MIPS Arithmetic Instructions
– Memory instruction – Control instruction

MIPS ARITHMETIC
• All instructions have 3 operands
• Operand order is fixed (destination first)
C code: A = B + C
add a, b, c
MIPS code: add $s0, $s1, $s2
addi $s0, $s1, 100
= $s0 = $s1 +100
(associated with variables by compiler)

MIPS ARITHMETIC
MIPS code: add $s0, $zero, $zero
$zero is the register which has 0 value.
Thus the meaning of the code $s0 = 0 + 0 = 0
Initializing the register s0

MIPS ARITHMETIC
Subtraction MIPS code: sub $s1, $s1, 1
the value without $ indicates a constant value (value 1).
Thus the meaning of the code $s1 = $s1 – 1
Decreasing $s1 value by 1

MIPS MACHINE LANGUAGE
Instructions for Making Decisions (Flow Control) – if statement
– go to statement,
There are two types of decision-making instructions in MIPS
– similar to an if statement with a go to
– change the “next” instruction to be executed
The First instruction
beq register1, register2, L1 I – type
– go to the statement labeled L1 if the value in register1 equals the value in register2.
– beq stands for “branch if equal”

MIPS ARITHMETIC
MIPS code: beq $s1, $s2, finish
finish indicates statement
Thus the meaning of the code If $s1 == s2,
Go to the “finish” statement

MIPS MACHINE LANGUAGE
• MIPSunconditionalbranchinstructions:jump j Label J – type
– Next instruction is at Label

MIPS MACHINE LANGUAGE
Practice understanding MIPs instructions
– using examples in lecture notes or CW example

VISIT US FOLLOW US
WWW.XJTLU.EDU.CN @XJTLU

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com