日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

CS 61程序代做、代寫C/C++編程設計

時間:2024-02-08  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CS 61 - Programming Assignment 3
Objective
The purpose of this assignment is to give you more practice with I/O, and with left-shifting, aka
multiplying by 2, and useful 2’s complement logic.
High Level Description
Store a number to the memory address specified in your assn 3 template. In your program, load
that number to a register, and display it to the console as a 16-bit two's complement binary (i.e.
display the binary value stored in the register, as a sequence of 16 ascii '1' and '0' characters).
Note: Valid numbers are [#-**768, #**767] (decimal) or [x0000, xFFFF] (hex)
Your Tasks
You do not yet know how to take a multi-digit decimal number from user ascii input and convert it
to binary, so for this assignment you are going to let the assembler do that part for you:
you will use the .FILL pseudo-op to take a literal (decimal or hex, as you wish) and translate it into a
16-bit two's complement binary, which will be stored in the indicated memory location; and then
you will Load that value from memory into a register.
You MUST use the provided assn3.asm template to set this up: it ensures that the number to be
converted is always stored in the same location (the memory address specified in your template)
so we can test your work; make sure you fully understand the code fragment we provide.
At this point, your value will be stored in, say, R1: it is now your job to identify the 1’s and 0’s from
the number and print them out to the console one by one, from left (the leading bit, aka the
leftmost bit, aka bit 15, aka the most significant bit) to right (the trailing bit, aka the rightmost bit,
aka bit 0, aka the least significant bit).
Important things to consider:
● Recall the difference between a positive number and a negative number in 2’s complement
binary: if the most significant bit (MSB) is 0, the number is considered positive (or zero);
if it is 1, the number is negative.
● The BRanch instruction has parameters (n, z, p) which tell it to check whether the LMR (Last
Modified Register) is negative, zero, or positive (or any combination of such tests).
Hint: what can you say about the msb of the LMR if the n branch is taken?
Review the workings of the NZP condition codes and the BR instruction here .
● Once you are done inspecting the MSB and printing the corresponding ascii '0' or '1', how would
you shift the next bit into its place so you could perform the next iteration?
Hint: the answer is in the objectives!
Pseudocode:
for(i = 15 downto 0):
if (msb is a 1):
print a 1
else:
print a 0
shift left
Note on creating LC-3 "control structures"
See here for tips on creating LC-3 versions of the branch and loop control structures you are familiar
with from C++ (Resources -> LC-3 Resources -> LC3 Assembly Language -> Control Structures in LC3)
Expected/ Sample output
In this assignment, your output will simply be the contents of R1, printed out as 16 ascii 1's and 0's,
grouped into packets of 4, separated by spaces (as always, newline terminated, but with NO
terminating space!)
So if the hard coded value was xABCD, your output will be:
1010 1011 1100 1101
(The value stored to memory with .FILL was xABCD)
Note:
1. There are spaces after the first three "packets" of 4 bits (but no space character at end!)
2. There is a newline after the output - again, there is NO space before the newline
3. You must use the memory address specified in your template to hold the value to be output
Your code will obviously be tested with a range of different values: Make sure you test your code
likewise!
Uh…help?
● MSB
○ Stands for Most Significant Bit
■ aka “left most bit” or “leading bit” or bit 15
○ When MSB is 0:
■ Means that the number is Not Negative (Positive or Zero)
○ When MSB is 1:
■ Means that the number is Negative
○ Further Reading
■ https://en.wikipedia.org/wiki/Most_significant_bit
● Left Shifting
Left shifting means that you shift all the bits to the left by 1: so the MSB is lost, and is replaced
by the bit on its right. A 0 is "shifted in" on the right to replace the previous LSB.
4-bit Example:
0101 ; #5
When Left Shifted, with 0 shifted in to LSB:
1010 <---- 0101
1010 ; #10
What happened when we left shifted? How did the number change?
When left shifting, the number gets multiplied by 2? Why 2?
Well, what happens when you shift a decimal number one place to the left? Why?
(Practical differences between decimal and binary numbers are that we don't usually limit
decimal numbers to a specific number of places, nor do we usually pad them with leading zeros).
Further Reading
● https://en.wikipedia.org/wiki/Logical_shift
Submission Instructions
Submit ("Upload") your assignment3.asm file (and ONLY that file!) to the Programming Assignment 3
folder in Gradescope: the Autograder will run & report your grade within a minute or so.
You may submit as many times as you like - your assignment grade will normally be that of your last
submission.
If you wish to set your grade to a previous submission with a higher score, you may open your
"Submission history" and "Activate" any other submission - that's the one we will see.
Rubric
● To pass the assignment, you need a score of >= 80%.
The autograder will run several tests on your code, and assign a grade for each.
But certain errors (run-time errors, incorrect usage of I/O routines, missing newlines, etc.) may
cause ALL tests to fail => 0/100! So submit early and study the autograder report carefully!!
● You must use the template we provide - if you make any changes to the provided starter code,
the autograder may not be able to interpret the output, resulting in a grade of 0.
如有需要,請加QQ:99515681 或WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:CISC3025代做、代寫Java,c++設計編程
  • 下一篇:代寫Computer Security and Networks編程
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    日韩精品一区二区三区高清_久久国产热这里只有精品8_天天做爽夜夜做爽_一本岛在免费一二三区

      <em id="rw4ev"></em>

        <tr id="rw4ev"></tr>

        <nav id="rw4ev"></nav>
        <strike id="rw4ev"><pre id="rw4ev"></pre></strike>
        理论片一区二区在线| 久久亚洲视频| 韩国成人精品a∨在线观看| 午夜精品久久久久久久久久久久| 韩国三级在线一区| 亚洲欧美日韩国产综合在线| 欧美日韩亚洲国产一区| 国产午夜精品一区二区三区视频| 欧美在线视频在线播放完整版免费观看| 久久久久久久久久久久久9999| 久久精品网址| 老鸭窝亚洲一区二区三区| 在线看欧美视频| 亚洲国产婷婷香蕉久久久久久99| 久久久精品性| 欧美主播一区二区三区| 亚洲一区二区三区免费在线观看| 欧美福利电影网| 亚洲性视频网址| 老巨人导航500精品| 欧美精品三区| 国产精品视频免费观看www| 国产精品亚洲欧美| 国产日韩一级二级三级| 欧美日韩一区二区在线观看视频| 先锋资源久久| 国产精品v欧美精品v日韩精品| 亚洲在线观看视频网站| 国产一区二区三区久久久| 国产精品九九| 欧美一区二区三区视频| 欧美激情综合五月色丁香| 欧美一区二区高清| 欧美性天天影院| 在线观看不卡| 亚洲欧洲一区二区三区在线观看| 亚洲午夜av| 一本色道久久综合狠狠躁篇怎么玩| 国产精品一区二区三区成人| 欧美在线在线| 亚洲一区二区三区免费视频| 亚洲中午字幕| 欧美一区二粉嫩精品国产一线天| 99国产精品私拍| 欧美主播一区二区三区| 亚洲夜间福利| 激情欧美日韩一区| 欧美精品一卡| 欧美人与性动交a欧美精品| 久久国产精品99精品国产| 久久久久中文| 亚洲伦理在线免费看| 欧美视频一区二区三区…| 一区二区日韩精品| 欧美日本二区| 欧美日韩国产成人在线免费| 一区二区在线观看av| 亚洲已满18点击进入久久| 91久久精品国产91性色tv| 国产精品免费观看在线| 欧美精品免费看| 欧美性大战xxxxx久久久| 在线观看精品视频| 亚洲在线免费| 在线一区二区视频| 亚洲伦理在线观看| 99精品国产高清一区二区| 亚洲区中文字幕| 亚洲欧美日韩视频一区| 美女福利精品视频| 欧美va亚洲va香蕉在线| 欧美天天影院| 久久久久久综合网天天| 欧美波霸影院| 久久久久久久久久久一区| 9i看片成人免费高清| 米奇777在线欧美播放| 欧美在线看片a免费观看| 久久国产精品亚洲77777| 1000精品久久久久久久久| 欧美日韩在线综合| 国产日韩精品一区二区| 欧美亚州韩日在线看免费版国语版| 国产精品wwwwww| 欧美国产精品人人做人人爱| 亚洲一区在线直播| 国产一区二区三区久久久| 久久精品国产亚洲一区二区| 国产精品素人视频| 午夜精品久久久久久久久| 久久亚洲精品一区| 国产日韩欧美一区| 欧美理论电影网| 亚洲一级在线观看| 国产日韩欧美日韩| 欧美jizzhd精品欧美喷水| 亚洲激情成人网| 国产亚洲精品aa午夜观看| 国内综合精品午夜久久资源| 欧美伦理a级免费电影| 亚洲欧洲日韩综合二区| 欧美精品亚洲二区| 久久影院午夜论| 欧美福利在线观看| 亚洲永久免费av| 亚洲精品1区2区| 亚洲欧美另类综合偷拍| av成人免费| 国产精品初高中精品久久| 亚洲国产成人av好男人在线观看| 国产亚洲欧洲一区高清在线观看| 欧美日韩亚洲一区二区| 亚洲欧美日韩成人| 久久久久久自在自线| 欧美va天堂| 黑丝一区二区三区| 午夜久久久久久久久久一区二区| 西西裸体人体做爰大胆久久久| 你懂的亚洲视频| 亚洲另类春色国产| 欧美日韩视频一区二区三区| 亚洲精品乱码视频| 国产精品男gay被猛男狂揉视频| 欧美在线啊v| 国产欧美日韩精品a在线观看| 宅男噜噜噜66一区二区| 国产精品永久免费视频| 亚洲第一色中文字幕| 欧美日韩在线直播| 国产精品久久久久三级| 欧美理论片在线观看| 久久久久久亚洲精品不卡4k岛国| 亚洲国产裸拍裸体视频在线观看乱了中文| 久久精品盗摄| 国产精品一区二区在线观看| 国产手机视频精品| 亚洲美女视频在线观看| 欧美精品自拍偷拍动漫精品| 久久一区二区三区四区| 亚洲免费高清| 欧美国产日韩一区二区在线观看| 午夜在线视频一区二区区别| 国产精品国产三级国产a| av成人免费| 一本到12不卡视频在线dvd| 亚洲已满18点击进入久久| 亚洲电影免费观看高清完整版在线观看| 先锋影音国产一区| 国产精品久久久久久久久久免费| 亚洲精品在线一区二区| 在线日韩视频| 亚洲午夜激情免费视频| 亚洲自拍都市欧美小说| 欧美亚洲免费在线| 欧美国产专区| 亚洲性色视频| 亚洲片在线资源| 国产精品你懂的在线| 久久精品导航| 亚洲天堂第二页| 一本在线高清不卡dvd| 国产精品亚洲片夜色在线| 国产日韩欧美在线观看| 久久嫩草精品久久久精品一|