12_Y86
.docx
keyboard_arrow_up
School
University of Massachusetts, Lowell *
*We aren’t endorsed by this school
Course
2030
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
3
Uploaded by JusticeBoulder10235
COMP.2030
LAB 12/6/23
NAME _Wendy Carvalho__________________________________________
1.
Each byte sequence below indicates
address: Y86 encoding
For each byte sequence below, determine the Y86 instruction sequence it encodes. 0x100: 30 f3 fcff ffff ffff ffff 4063 00 0800 0000 0000 0000
irmovq $-4, %rbx
rmmovq %rsi, 0x800(%rbx)
0x200: 50 54 0700 0000 0000 0000 b0 1f
mrmovq rbp, 0x7(rsp)
popq rcx
0x300: 61 13 73 000200000000000000
subq rcx, rbx
je 0x200
0x400: 6362a00f
xorq %rsi, %rdx
pushrq rax
2.
A Y86 machine is a subset of x86 with the instruction set shown above right. Write the byte encoding of the following Y86 instruction sequence, starting at address 0x100.
irmovq
$15, %rbx
rrmovq
%rbx, %rcx
loop:
rmmovq
%rcx, -3(%rbx)
addq
%rbx, %rcx
jmp
loop
0x100 30F3 0000 0000 0000 0000 000F
0x200 4031 0000 0000 0000 0000 0000
0x300 4013 f3ffffffffffffffffff
0x400 6031 0000 0000 0000 0000 0000
0x500 70 0001 0000 0000 0000 0000 3.
Suppose that the 1-bit ALU in Y86 is constructed as on the
right, except that OR gate is replaced by an XOR gate so that
it can perform add, sub, and and xor operations.
Also shown are three control signals: Ainvert, Binvert, and
Operation.
The 2-bit Operation controls the multiplexer to select the
appropriate input to the output of the ALU. The two bits are
determined by the Y86 instruction iCode of 6 for OP
instructions and iFun code. A separate combinational logic circuit takes two bits (ifun
1
and ifun
0
) for four OP instructions (0, 1, 2, and 3 for add, sub, and, and xor), and generates appropriate values for Operation. Write the truth table for the combinational logic with inputs of ifun
1
and ifun
0
and the output tied to Operation.
ifun
1
ifun
0
Operation
-----------------------------------
0
0
add
0
1
xor
1
0
and
1
1
sub
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
SP=1239H, SS=9876H, the
physical address is
OAAAFH O
AAAFOH O
1всобн о
O H66666
The instruction JMP BX is a
* direct jump
True O
False O
arrow_forward
Assembly language x86
using MUL
arrow_forward
microprocessor 8086
arrow_forward
Carider the data path below for a single cyde 32-bits MIPS processor
Amume that we are ecuing the folowing instruction
ADD $2, S3, Suo
What is the value of the element pointed by awrow number 1 by in hexadecimal?
Note that the PC and the content of registers SID and S1 are found in bottom left of the fgre below
Address
Content
OK000016EC
ON0000ABOD
Data Memory OX000016FO
ON0OA01245
OX000016F4
Ox00001A42
MentaFlagy
Conte
Ox000171C
ON00OB124F
Ox0001720
Ox00021345
Fead
Ox0001724
OX000067AB
ALU
Ox0001734
OX0000AB35
meory
Ox0001738
ONO000FA72
Ox000174C
ON0000ABOC
$s0 = OX0000AFO0
$s2 = OX00000OBA
$s3 = Ox00000001
Register File and PC
PC = OX000FAC04
(Before executing ADD)
li li
arrow_forward
Suppose r0 = ox300010A0, r2 = 0x00000011, and the memory layout is as follows
Address: Data:
0x300010A7 0x72
0x300010A6 0XA5
0x300010A5 0x9F
0x300010A4 0x00
0x300010A3 0x50
0x300010A2 0x2B
0x300010A1 0XA5
0x300010A0 0x01
-What are the values of r0 and r1 after executing the following code? Illustrate your process in a memory map.
LDR r1, [r0], #3
ADD r1, r1, r2
STR r1, [r0, r#4]
arrow_forward
Suppose r0 = ox300010A0, r2 = 0x00000011, and the memory layout is as follows
Address: Data:
0x300010A7 0x72
0x300010A6 0XA5
0x300010A5 0x9F
0x300010A4 0x00
0x300010A3 0x50
0x300010A2 0x2B
0x300010A1 0XA5
0x300010A0 0x01
-What is the Value of r0 and r1 after executing LDR r1, [r0, #2]
-What are the values of r0 and r1 after executing the following code? Illustrate your process in a memory map.
LDR r1, [r0], #3
ADD r1, r1, r2
STR r1, [r0, r#4]
arrow_forward
Fill the 17 dotted blocks in the 8086 memory system installed at the base address 0000OH.
1子,
s)
HY62256
HYE22
Ae-A4
16.--
Dy-Dy
Ae-A4
Dy-D,
OE
WE
CE
DE
名
CE
HYE22
HY622
Ap-A
Ao-A14
Dy-D,
Dy Dy
OE
WE
CE
DE
WE
14 HCE
741S139
7415129
YO
YO
Y1
Y1
Y2
Y2
Y3
01
MAO
01
40
02A
13i-1
BHE
62A
Y5
Y5
629
Y8
020
YO
17
BC
%3D
arrow_forward
Below is a list of 64-bit memory address references given as word address.
Ox03, Oxb4, Ox2b, Ox01, Oxb7, Ox58, Oxbe, Ox02, Oxb5, Ox2e, Oxb6, Ox5b
0000
4
0100 8
1000
1100
1
0001
5
0101
9
1001
d
1101
2
0010
6
0110
a
1010
e
1110
3
0011
7
0111
b
1011
f
1111
Given a direct-mapped cache with 16 word blocks, what is the hit ratio?
O 0.5
O 1
O 0.75
O 0.25
arrow_forward
physcal addresses are 4s ng
4 Ame dat in a cetain compe, te
addresses can be translaled without y TLB
entries At most how many ditina vid
the address translation peh has 12 vld
The Translation Look aside Bulfer (TLB)i
sine is kB and the word size iby
The memory is word addresible. The pe
virtual addresses are 64 bea long d th
sine is
miss?
arrow_forward
MOV AX, BX is an example of _____.
a.
Direct addressing
b.
Register Indirect addressing
c.
Register addressing
d.
Implied addressing
arrow_forward
Below shows the following hexidecimal values:Address 1000: 13Address 1001: 03Address 1002: C5Address 1003: 00
Provide the format and assembly language instruction for the following hexadecimal values.
arrow_forward
intel 8086 microprocessor
arrow_forward
Q6: A digital computer has a memory unit with 24 bits per word. The instruction set
consists of 110 different operations. All instructions have an operation code part
(opcode) and an address part (allowing for only one address). Each instruction is
stored in one word of memory.
(a) How many bits are needed for the opcode?
(b) How many bits are left for the address part of the instruction?
(c) What is the maximum allowable size for memory?
(d) Can we extend this instruction set by adding new 10 instructions and
keeping the same length of opcode part?
(e) Determine the type of this instruction set: stack-based ISA or accumulator-
based ISA or general purpose registers-based ISA?
arrow_forward
8086 microprocessor
arrow_forward
intel 8086 microprocessor
arrow_forward
LCPU assignment
Multiply the number by 1.25: A = X * 1.25X = 0x3C (direct). Then save the result to main memory using direct addressing.
Example:
Multiply the value by 0.75: X * 0.75 = 0.5 * X + 0.25 * X
X = 100 (0x64)100 * 0.75 = 750x64 = 01100100
00110010 [Shift 1x to the right - add 0 to the left and cut off one bit from the right]00011001 [Shift 2x to the right - add 00 to the left and truncate 2 bits from the right]01001011 [Sum of previous two transactions]
01001011 = 0x4b = 75
arrow_forward
0001 = Load AC from memory
0010 = Store AC to memory
0101 = Add to AC from memory
0011 = Load AC (the accumulator register) from an I/O device
0111 = Store AC to an I/O device
With these instructions, a particular I/O device is identified by replacing the 12-bit address portion with a 12-bit device number. Remember that a number ending with a small ‘h’ means the number is a hexadecimal number.
What is the hexadecimal string that expresses the following instructions?
Load AC from memory location 62h.
Add the contents of memory location 451h to AC.
Store AC to memory location 8h.
Store AC to I/O device number 8h.
arrow_forward
0001 = Load AC from memory
0010 = Store AC to memory
0101 = Add to AC from memory
0011 = Load AC (the accumulator register) from an I/O device
0111 = Store AC to an I/O device
With these instructions, a particular I/O device is identified by replacing the 12-bit address portion with a 12-bit device number. Remember that a number ending with a small ‘h’ means the number is a hexadecimal number.
What is the hexadecimal string that expresses the following instructions?
Load AC from memory location 62h.
Add the contents of memory location 451h to AC.
Store AC to memory location 8h.
Store AC to I/O device number 8h.
arrow_forward
What will be the
value of ALUSrc for
add instruction
Inst[25–21] rs
Read
register 1
ALU operation
Read
data 1
Inst[20–16] n
MemWrite
Read
register 2
Registers Read
Write
register
MemtoReg
Zero
ALU ALU
result
Inst
ALUSrc
Read
data
Address
data 2
Inst[15–11]|
Write
data
Write
data
Data
memory
RegDst
RegWrite
16
MemRead
Sign
extend
Select one:
а. О
b. None
С. 1
d. X
arrow_forward
For the 8086 microprocessor, show the physical addresses and the contents of memory after execution of the following directives, if DS=A800H.DATA1 DW 65DATA2 DD 0A4718HDATA3 DD 6E000CHDATA4 DB 2 6 , 3 1 , 0FFh, 0 1 1 1 1B
arrow_forward
DEBUG shows the address 807C:010F. The corresponding physical address is ______.
arrow_forward
The first two bytes of a 4M x 16 main memory have the following hex values:
Byte 0: FFByte 1: 01
If these bytes hold a 16-bit two's complement integer, what is the actual decimal value if:
a) memory is big endian:__________________
b) memory is little endian:__________________
arrow_forward
ISA of a hypothetical CPU
1 Address
Memory:
Address
Data - (8-bits)
LOAD M
100
25
STORE M
101
90
ADD M
102
65
SUB M
103
36
MUL M
104
22
105
77
DIV M
106
89
Where:
Note: all numbers are hexadecimal
M-a memory address
AC - accumulator
Sample program:
//line 1
/line 2
//line 3
//line 4
//line 5
//line 6
LOAD 100
ADD 101
STORE 106
LOAD 102
SUB 103
STORE 105
Answer the following questions based on the given information above.
1. What is the content of memory location 106 after executing line 3?
2. What is the content of memory location 105 after executing line 6?
3. Write a program segment that will multiply the content of memory location 105 with the content of AC and store the result at memory location 100.
а.
b.
4. For this CPU, what is the width of the program counter? (express answer in terms of bits, do not include the word "bits" in your answer)
arrow_forward
.Memory size = 32 M address line
%3D
25 bits O
35 bits O
15 bits O
arrow_forward
8085 Assembly language.
arrow_forward
What will be the value of
ALUSrc for add instruction
Read
register 1
Read
register 2
Registers Read
Inst[25-21]
| ALU operation
Read
data 1
| MemWrite
MemtoReg
Inst[20–16] t
Zero
ALU ALU
result
Inst
ALUSrc
Write
register
Read
data
Address
data 2
Inst[15–11)
Write
data
Data
Write
data
memory
RegDst
RegWrite
| MemRead
16
Sign
32
extend
Select one:
а. X
b. 0
О с. 1
O d. None
arrow_forward
12. What is the content value for instruction address 803? *
PC
804
AC
804
АС
1CC6
PC
D4CA
IR
5913
IR
6910
А.
OB.
PC
803
PC
803
АС
B980
AC
D4C4
IR
6910
IR
6910
O D.
arrow_forward
Consider the following table that represents part of the memory of a 16-bit address space that has an
addressability of 2 bytes (like LC-3):
ADDRESS
OxFFFF
OXOCOE
OXOCOD
Ox0C0C
OXOCOB
OXOCOA
0x0C09
0x0000
CONTENTS
1111 1111 1111 1111
1111 1110 1101 1100
0001 1011 1100 0101
0110 0101 1000 0111
1100 0000 0100 0000
0011 0001 0101 0010
0000 1100 0000 1101
0000 0000 0000 0000
The table above shows the addresses in hex (base 16) and the contents at the corresponding address in binary
(base 2).
A.) What are the contents in hex of the memory location at following address in binary: 0000 1100 0000
1110?
(Enter hex like the following example: Ox2A3F)
arrow_forward
Write code on C or C++.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Related Questions
- Carider the data path below for a single cyde 32-bits MIPS processor Amume that we are ecuing the folowing instruction ADD $2, S3, Suo What is the value of the element pointed by awrow number 1 by in hexadecimal? Note that the PC and the content of registers SID and S1 are found in bottom left of the fgre below Address Content OK000016EC ON0000ABOD Data Memory OX000016FO ON0OA01245 OX000016F4 Ox00001A42 MentaFlagy Conte Ox000171C ON00OB124F Ox0001720 Ox00021345 Fead Ox0001724 OX000067AB ALU Ox0001734 OX0000AB35 meory Ox0001738 ONO000FA72 Ox000174C ON0000ABOC $s0 = OX0000AFO0 $s2 = OX00000OBA $s3 = Ox00000001 Register File and PC PC = OX000FAC04 (Before executing ADD) li liarrow_forwardSuppose r0 = ox300010A0, r2 = 0x00000011, and the memory layout is as follows Address: Data: 0x300010A7 0x72 0x300010A6 0XA5 0x300010A5 0x9F 0x300010A4 0x00 0x300010A3 0x50 0x300010A2 0x2B 0x300010A1 0XA5 0x300010A0 0x01 -What are the values of r0 and r1 after executing the following code? Illustrate your process in a memory map. LDR r1, [r0], #3 ADD r1, r1, r2 STR r1, [r0, r#4]arrow_forwardSuppose r0 = ox300010A0, r2 = 0x00000011, and the memory layout is as follows Address: Data: 0x300010A7 0x72 0x300010A6 0XA5 0x300010A5 0x9F 0x300010A4 0x00 0x300010A3 0x50 0x300010A2 0x2B 0x300010A1 0XA5 0x300010A0 0x01 -What is the Value of r0 and r1 after executing LDR r1, [r0, #2] -What are the values of r0 and r1 after executing the following code? Illustrate your process in a memory map. LDR r1, [r0], #3 ADD r1, r1, r2 STR r1, [r0, r#4]arrow_forward
- Fill the 17 dotted blocks in the 8086 memory system installed at the base address 0000OH. 1子, s) HY62256 HYE22 Ae-A4 16.-- Dy-Dy Ae-A4 Dy-D, OE WE CE DE 名 CE HYE22 HY622 Ap-A Ao-A14 Dy-D, Dy Dy OE WE CE DE WE 14 HCE 741S139 7415129 YO YO Y1 Y1 Y2 Y2 Y3 01 MAO 01 40 02A 13i-1 BHE 62A Y5 Y5 629 Y8 020 YO 17 BC %3Darrow_forwardBelow is a list of 64-bit memory address references given as word address. Ox03, Oxb4, Ox2b, Ox01, Oxb7, Ox58, Oxbe, Ox02, Oxb5, Ox2e, Oxb6, Ox5b 0000 4 0100 8 1000 1100 1 0001 5 0101 9 1001 d 1101 2 0010 6 0110 a 1010 e 1110 3 0011 7 0111 b 1011 f 1111 Given a direct-mapped cache with 16 word blocks, what is the hit ratio? O 0.5 O 1 O 0.75 O 0.25arrow_forwardphyscal addresses are 4s ng 4 Ame dat in a cetain compe, te addresses can be translaled without y TLB entries At most how many ditina vid the address translation peh has 12 vld The Translation Look aside Bulfer (TLB)i sine is kB and the word size iby The memory is word addresible. The pe virtual addresses are 64 bea long d th sine is miss?arrow_forward
- MOV AX, BX is an example of _____. a. Direct addressing b. Register Indirect addressing c. Register addressing d. Implied addressingarrow_forwardBelow shows the following hexidecimal values:Address 1000: 13Address 1001: 03Address 1002: C5Address 1003: 00 Provide the format and assembly language instruction for the following hexadecimal values.arrow_forwardintel 8086 microprocessorarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning