代写Fundamentals of Computer Systems Assessment 2代写C/C++语言

Module Title

Fundamentals of Computer Systems

Assignment Mode

Individual Assignment

Word Count Limit

2000 words (+/- 10%)

Citation Format

APA

Marks

100 marks

Due Date

Last Lesson

Assignment Brief (Assembly Language )

Objective:

The primary aim of this assignment is to assess your proficiency in assembly language programming, specifically focusing on key areas such as simple data structure and code documentation. This includes demonstrating a good understanding of assembly language concepts when implementing AL solutions for this assignment. You are required to implement, document, and optimize code while ensuring efficiency, clarity, and adherence to best practices.

Assignment Question

Topics Covered

Learning Outcomes (LOs)

1. Array Initialization

- Topic 8

- Understand instructions; ALU instructions

2. Linear Search Implementation

- Topic 8

- Understand the Flags/Status register

- Understand instructions; ALU instructions

- Understand control, branching and loops

3. Target Value Handling

- Topic 8

 

 

 

- Topic 9

- INT 21h for inputs and outputs

- Understand the Flags/Status register

- Understand instructions; ALU instructions

- Understand control, branching and loops

- Understand exceptions and exception handling

4. Code Efficiency

- Topic 8

- INT 21h for inputs and outputs

- Understand the Flags/Status register

- Understand instructions; ALU instructions

- Understand control, branching and loops

Requirements:

1.   Array Initialization (13 marks)

o Correctly initialize an array with specified values.

o Ensure array syntax is correct and values are in the expected order.

2.   Linear Search Implementation (28 marks)

o Implement a Linear Search algorithm to find a target value in an array.

o Ensure the algorithm is efficient and correctly identifies the target.

3.   Target Value Handling (13 marks)

o Search for a specific target value and output the corresponding index.

o Display the correct index and handle cases where the target is not found.

4.   Code Efficiency (13 marks)

o Optimize code to reduce redundancy and improve execution speed.

o Use registers and instructions efficiently to achieve optimal performance.

5.   Comments and Documentation (13 marks)

o Provide clear, detailed comments explaining each part of the code.

o Ensure the code is understandable and maintainable.

6.   Live Demo & Communication (20 marks)

o Provide clear and confident explanation of the code’s functionality and the logic behind it.

o Demonstrated strong understanding of the code.

Deliverables:

.   A comprehensive report including code snippets and explanations.

.   Assignments to be written in NASM for DosBox or DosBox Staging.

.   Assignment code to be submitted as linear.asm file.

Submission Guidelines:

.   Submit all required files in a zip folder named as: LastName_FirstName_FCS.zip.

.   Upload your assignment via the online submission portal by the stated deadline.

Detailed Rubric:

Attached Marking Rubrics

Note: Instant 0 mark will be awarded for the assignment if assembly codes are not written in NASM for DosBox, or DosBox Staging.

Implementing Linear Search

You will write an assembly program to create a linear search algorithm (refer to Appendix) to find a target value within an array of numbers (5, 3, 7, 1, 4, 9, 2, 8, 6) and display the index of the target value. The program will then display on the screen: Element found at index: 8. (Since target value is 6, the index to be displayed on the screen is 8.)

Compulsory code to be included for Assignment:

section .data

array db 5, 3, 7, 1, 4, 9, 2, 8, 6      ; Array of elements

array_size db 9                        ; Size of the array (byte)

target db 6                            ; Target value to search for (byte)

Expected output for Assignment:

C:\> linear.com

Element found at index: 8

Assessment Summary:

1.    Array Initialization: The array is correctly initialized with the required values. This consistency shows attention to detail in setting up data for operations.

2.    Linear Search Implementation: The Linear Search algorithm is correctly implemented to find the target value (6). The algorithm efficiently traverses the array to find the specified value, demonstrating a solid understanding of search techniques in assembly language.

3.    Target Value Handling: The program correctly finds the target value and displays the  output: "Element found at index: 8." The correct handling and output of the target index show proficiency in addressing elements in the array.

4.    Code Efficiency: The code uses optimal logic and efficient register management, demonstrating an understanding of how to execute search operations effectively in assembly.

5.    Comments and Documentation: The code includes detailed comments, providing clear explanations of the logic and processes. This practice aids in understanding the code’s flow and purpose, highlighting good coding habits.

6.    Live Demo & Communication: Provide clear and confident explanation of the code’s functionality and the logic behind it. Demonstrate strong understanding of the code. 

Appendix

LINEAR SEARCH

Linear search is a straightforward searching algorithm used to find a target value in a list or    array. It works by sequentially checking each element in the list until the target is found or the end of the list is reached.

Steps:

1.   Start from the beginning of the list.

2.   Compare each element one by one with the target value.

o  If an element matches the target, the search is successful, and the index of the element is returned.

o  If no match is found by the end of the list, the target isn’t in the list.

3.   End the search once the target is found or the list has been fully traversed.

Example:

Suppose we have a list:

[10,23,45,70,11,15]

and were searching for the target value 70.

1.   Compare 10 with 70 (no match).

2.   Compare 23 with 70 (no match).

3.   Compare 45 with 70 (no match).

4.   Compare 70 with 70 (match found!).

Since the target 70 is found at index 3, the search stops, and the index 3 is returned.

Efficiency:

.     Time Complexity: O(n) in the worst and average cases, where nnn is the number of elements.

.     Space Complexity: O(1) since its an in-place search.

Usage:

Linear search is useful for:

.     Unsorted or small lists where a more complex search algorithm would add unnecessary overhead.

.     Linked lists or similar data structures where random access is costly or impossible, as linear search does not rely on indexing.

While linear search is simple and flexible, it’s less efficient than binary search for sorted lists due to its O(n) time complexity.

Linear Search - CS50 Shorts:

https://www.youtube.com/watch?v=TwsgCHYmbbA


热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图