您的位置: 首页 > 科技

代写program程序、代做c++,Python编程

2024-04-04 来源:互联网


Write a LMC program that can convert an n-bit binary number into a decimal number. Display the natural number as output before halting the program. The first input determines the value for n. It is assumed this value will be equal to four, or greater. For example, if the first input is eight (8) then eight subsequent inputs are requested. If the subsequent inputs number were 1, 0, 0, 1, 0, 0, 0, 0 then the output would be 9. n input values are provided by the user, one for each bit:
The first of these is the least-significant bit. The n’th input is the most-significant bit. Q1. Describe your approach to solving the problem. Use natural language, structured like a conventional programming language to communicateyour design. When necessary, use looping and conditional constructs. Name symbols sensibly to make their use clear. Q2. Draft a test plan to be used as a verification method to ensure that your LMC programiscorrect. Tabularise test input value(s) and the expected output(s)
Consider uncommon cases. For example, when the calculator reaches its maximumvalue, when negative values are calculated, or when an input is unexpectedly large. Draft your test plan using the following template (two examples are provided):
Comma-separate the input and output values. Delete the examples.
Input Value(s)
Expected output
value(s)
Notes
2,4,6 10 All even numbers
1,3,5 9 All odd numbers
Q3. Implement an LMC program according to the algorithm you designed in Q1. Use the test suite you designed in Q2 to verify the implementation of your algorithmis
correct. Only symbolic addressing is to be used; numerical addressing will be disabled. LMC program must request the correct number of input(s). LMC program must produce the correct number of output(s). LMC program must produce the correct output value(s) for all given test cases. Code must be tidy (spacing, indentation) and comments are to be used to describe the
algorithm. Do not describe the function of each LMC instruction. Your LMC file should show the full history of how your solution was implemented. Use LMC IDE v1.5.0.0 (or greater)

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp

 

 

 

 

 

03-19 为何我毫不犹豫地称赞这个WhatsApp拉群工具 因为它改变了我的职业生涯
为何我毫不犹豫地称赞这个WhatsApp拉群工具 因为它改变了我的职业生涯
 当我第一次接触到WhatsApp拉群工具时,我并没有预料到它会对我的 [详细]
03-06 广西美容养生:古韵今风,焕发自然之美
广西美容养生:古韵今风,焕发自然之美
在广袤的中华大地上,广西以其独特的山水风光和丰富的文化底蕴吸引 [详细]
10-22 WhatsApp高级筛选工具,ws精准过滤软件,ws自动群发神器,高效营销
WhatsApp高级筛选工具,ws精准过滤软件,ws自动群发神器,高效营销
WhatsApp初高级筛选器以其卓越的性能和丰富的功能,成为用户筛选领 [详细]
01-31   用户体验升级,品牌口碑飙升!用 跨境电商LINE代拉群群发软件打造您的品牌传播神器  
  用户体验升级,品牌口碑飙升!用 跨境电商LINE代拉群群发软件打造您的品牌传播神器  
随着科技的不断进步,用户体验已成为品牌传播中至关重要的一环。 [详细]