国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

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編程
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久操网在线观看| 久久综合久久久| 久久久久久成人精品| 国产精品久久久久久影视| 日韩一级黄色av| 色婷婷综合久久久久| 久色视频在线播放| 国产富婆一区二区三区| 久久久中文字幕| 久久久久久亚洲精品中文字幕| 久久久久久亚洲精品| 日日狠狠久久偷偷四色综合免费| 色琪琪综合男人的天堂aⅴ视频 | 日韩中文字幕在线视频播放| 国产成人精品视频在线| 国产精品日韩在线| 久久国产视频网站| 自拍另类欧美| 亚洲国产一区二区三区在线 | 亚洲一区美女| 亚洲一卡二卡| 亚洲自拍另类欧美丝袜| 久久国产精品久久国产精品| 欧美日韩成人免费| 岛国视频一区免费观看 | 成人精品视频久久久久| 8090成年在线看片午夜| 日韩中文av在线| 久久99亚洲精品| 亚洲精品日韩精品| 欧美在线欧美在线| 国产麻豆日韩| 久久99精品久久久久久秒播放器| 国产精品日韩在线观看| 伊人久久大香线蕉综合75| 日韩av在线综合| 国严精品久久久久久亚洲影视| 国产精品一二三视频| 久久精品99久久| 精品国产成人av在线免| 日韩中文字幕一区| 蜜桃传媒一区二区| 国产精品av免费观看| 国产精品美女免费视频| 一区二区三区电影| 欧美亚洲另类制服自拍| av无码精品一区二区三区| 久久久精品久久久| 午夜老司机精品| 精品无人区一区二区三区竹菊| 91免费看片在线| 国产精品国产三级国产aⅴ浪潮 | 国产精品美乳一区二区免费| 亚洲在线色站| 激情六月丁香婷婷| 久久人人爽人人| 精品不卡在线| 欧美午夜视频在线| 久久久人成影片一区二区三区| 国产精品久久久久aaaa九色| 日本人成精品视频在线| 99在线视频免费观看| 国产精品极品美女粉嫩高清在线 | 欧美精品成人一区二区在线观看| 国产美女高潮久久白浆| 久久深夜福利免费观看| 日韩av大片免费看| 91精品视频专区| 伊人久久青草| 国产精自产拍久久久久久| 国产精品久久久久久搜索| 日本精品视频网站| 91高清视频免费| 亚洲一卡二卡| 国产精品亚洲视频在线观看| 国产精品视频公开费视频| 日韩av在线综合| 国产精品18久久久久久首页狼| 中文精品无码中文字幕无码专区 | 国产日韩一区欧美| 久久精品国产一区二区三区| 色欲色香天天天综合网www| 国产一区二区三区高清视频| 国产成人精品自拍| 热久久99这里有精品| 久久久999视频| 色中色综合成人| 久久青青草原一区二区| 一区二区精品国产| 国产女大学生av| 欧美激情一级精品国产| 成人亚洲欧美一区二区三区| 久久亚洲一区二区三区四区五区高| 欧美两根一起进3p做受视频| 国产精品丝袜白浆摸在线| 欧美在线观看网址综合| 日韩视频免费在线观看| 欧美亚洲另类在线| 国产精品久久久久国产a级| 国模精品视频一区二区| 久久国产色av| 91国产中文字幕| 日韩wuma| 日韩一区av在线| 欧美日韩亚洲综合一区二区三区激情在线| 色偷偷av一区二区三区| 欧洲亚洲在线视频| 精品久久国产精品| 国产这里只有精品| 伊人久久大香线蕉av一区| 97免费高清电视剧观看| 欧美一区二区三区……| 色噜噜久久综合伊人一本| 精品一区久久久久久| 欧美精品www| 久久综合一区二区三区| 欧美日韩国产精品一卡| 国产精品成人av在线| 国产剧情久久久久久| 午夜探花在线观看| 久久视频这里只有精品| 国产乱码精品一区二区三区日韩精品 | 狠狠色噜噜狠狠色综合久| 欧美大胆在线视频| 逼特逼视频在线| 日本一区二区高清视频| 日韩综合中文字幕| 国产免费观看久久黄| 日韩中文字幕一区二区| 国产精品久久久久免费a∨| 成人在线一区二区| 日韩美女av在线免费观看| 另类天堂视频在线观看| 国产成人综合精品| 国产一区一区三区| 欧美一级在线看| 久久夜色精品国产亚洲aⅴ| 91久久在线视频| 黄色免费福利视频| 午夜精品理论片| 国产精品嫩草在线观看| 国产精品一区二区三区成人| 日本不卡一区二区三区四区| 麻豆国产精品va在线观看不卡| 久久人人爽人人爽人人片av高请| 国产一区视频在线| 日本电影一区二区三区| 中文字幕色一区二区| 久久久久www| 国产成人精品av在线| 国产伦精品一区二区三区免费视频| 青青草成人免费在线视频| 亚洲国产精品久久久久爰色欲| 日韩中文在线中文网三级| 91免费看片在线| 精品一区二区成人免费视频| 日本精品视频在线| 亚洲色精品三区二区一区| 国产精品精品软件视频| 国产成人精品久久二区二区| 国产精品一区二区久久久| 欧美精品一区二区三区在线看午夜| 亚洲精品成人a8198a| 久久躁狠狠躁夜夜爽| 日韩在线中文视频| 国产经典一区二区三区| 国产精品一区二区三区观看| 国产制服91一区二区三区制服| 人妻av无码专区| 日本www在线播放| 亚洲高清资源综合久久精品| 欧美激情喷水视频| 精品国偷自产一区二区三区| 精品国产一区二区三区四区精华| 久久久国产视频| 国产成人精品一区二区三区福利| 国产黄视频在线| 久久久综合香蕉尹人综合网| 久久久免费在线观看| 91高清免费在线观看| 超碰在线观看97| 成人黄色中文字幕| 成人羞羞国产免费| 成人国产精品久久久| 97精品免费视频| 成人中文字幕av| 91久久精品视频| 成人精品一区二区三区电影免费| 国产欧美精品一区二区三区-老狼| 国产中文一区二区| 国产视频观看一区| 国产麻豆电影在线观看| 国产精品一区而去| 成人乱人伦精品视频在线观看| 国产精品永久在线| 97国产在线播放| 国产成人亚洲精品无码h在线| 久久精品国产sm调教网站演员 | 国产不卡av在线免费观看| 久久久之久亚州精品露出|