Programming 2: Machine Cycle, Languages, and Code Execution

Verified

Added on  2022/08/08

|5
|743
|299
Homework Assignment
AI Summary
This assignment delves into the core concepts of computer architecture and programming languages. The solution begins by meticulously explaining the four phases of the machine cycle: fetch, decode, execute, and store, detailing how each step contributes to code execution. The assignment then presents the contents of memory cells and registers after code implementation, providing a practical understanding of how instructions are processed. A key component of the assignment involves a comparison between machine and high-level languages, discussing their relative advantages and disadvantages in terms of readability, efficiency, and the complexity of programming. The analysis highlights the roles of binary and hexadecimal codes in both language types, demonstrating their significance in data representation and processing. Finally, the solution references relevant sources to support the analysis and provide additional context to the concepts discussed.
Document Page
PROGRAMMING 0
Boolean math and statistics
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
PROGRAMMING 1
Steps of the machine cycle
It is examined that major 4 phases of machine cycle that helped to perform the
developed code including fetch, execute and decode, and store. In which the fetch cycle is
capable to recover an order from the reminiscence used to perform code in the machine
language (Sodhi, Awasthi, & Sharma, 2019). The decode cycle utilizes the information of the
IR for examining which gates must be opened among the functional units of CPU and
burses. In which every gate helps to flow data from one unit to another for example, from
the register (0) to arithmetic logical unit (ALU) input 1. The execution cycle happens when
the deciphering logic has established and involves the transitory of standards among
numerous units and buses. The store cycle is used when the outcome of the given input is
printed to its terminus or memory site. The below table shows the content of lists and
every of the reminiscence cells after the code implementation:
Reminiscence cell address Contents Description
F0 20
(command= 20C0, Opcode=
2, register= 0 and C0= XY)
Load the 0 with the signal
identified in C0. Here
content in C0 is 000.
F1 CO
(command- C020, Opcode- C,
Register- 0 and 20- 000)
HALT the register 0 in
memory
F2 30 (command- 30C0,
Opcode- 3, C- register and C0
is 000)
Stock the bit information in
C- register in the C0.
F3 F8 (Command- F830,
opcode- F, 3 is register and
30 is 000)
Exclusive the bit information
in S-register and place
outcome in register R.
F4 20 (command- 20C0,
opcode- 2, 0 is register and
C0 is XY)
Load list (R) with the XY bit.
Document Page
PROGRAMMING 2
F5 0 (command is 0030, 2 is the
opcode, 0 is register and C0
is XY)
Load the R-register with the
signal identified in memory
cell whose address is XY in
the system.
F6 30 (command is 30F9, 0 is
the opcode, F is register and
C0 is XY)
Exclusive the bit information
in S and T and store the
output signal in R.
F7 F9
(here, command is 20C0, 2 is
opcode, 0 is register and C0
is XY).
Put the R with the XY, jump
to the next memory cell if
the bit information in the R
register is similar to the bit
information stored in 0
registers.
F8 FF (command is 20C, 2 is
opcode, 0 is register and CO
is X)
HALT implementation
F9 FF (command is 20C0, 2 is
opcode, 0= register and C0 is
XY).
HALT implementation in the
memory
Comparing among Machine and high languages
It is argued that high level and machine tongues are important for the interaction
among the processing unit and programmer. In which a machine language is developed for
the purpose of execution while high-level language is developed to perform operations in
the computing devices. In terms of effectiveness and reliability, a great level of language is
more reliable as compared with the machine linguistic (Moreno-Rabel, 2016). The duty of
programming through binary code is complex in the case of machine language but it can be
simply performed using a high-level linguistic. It is reported that binary and hexadecimal
codes are significant for both these languages as the binary and hexadecimal codes use
digital numbers including 0, 1 and many more that are easy to understand and evaluate as
Document Page
PROGRAMMING 3
compared with the default codes. In both machine language and high-level language, these
codes can be performed easily and evaluated in a reliable manner.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
PROGRAMMING 4
References
Moreno-Rabel, M. D. (2016). An access detection and machine cycle tracking system for
machine safety. The International Journal of Advanced Manufacturing
Technology, 87(1-4), 77-101.
Sodhi, P., Awasthi, N., & Sharma, V. (2019). Introduction to Machine Learning and Its Basic
Application in Python. Available at SSRN 3323796.
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]