国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    亚洲区一区二区三区| 久久九九国产精品怡红院| 超碰网在线观看| 91精品综合久久| 国产精品久久久久久久乖乖| 亚洲精品免费一区二区三区| 亚洲乱码一区二区三区三上悠亚 | 国产日产欧美精品| 久久久一本精品99久久精品 | 青草网在线观看| 97人人模人人爽人人少妇| 国产精品欧美一区二区三区奶水| 亚洲欧洲精品一区二区三区波多野1战4| 欧美日韩一区二区视频在线| 91精品国产高清久久久久久| 国产精品视频在线播放| 午夜精品亚洲一区二区三区嫩草| 国产精品第一页在线| 激情网站五月天| 国产精品视频免费一区二区三区| 激情伦成人综合小说| 国产精品久久久久久久美男| 国产在线精品播放| 中文精品视频一区二区在线观看| 国产精品自拍首页| 亚洲字幕在线观看| 国产极品尤物在线| 日本精品视频在线| 国产成人鲁鲁免费视频a| 狠狠色综合一区二区| 国产精品视频99| 国内精品久久久久久影视8| 国产精品露脸自拍| 国产欧美日韩中文字幕| 中文字幕一区二区三区四区五区 | 欧美在线www| 国产精品久久久久久久久久免费 | 久久精品日产第一区二区三区| 日本阿v视频在线观看| 国产成人精品视频在线| 国产亚洲福利社区| 亚洲成人一区二区三区| 久久久久久一区二区三区| 激情久久av| 在线天堂一区av电影 | 欧美激情中文字幕在线| 91精品国产乱码久久久久久久久| 日本一区二区在线视频| 日韩视频永久免费观看| 国产欧美一区二区在线播放| 亚洲精品日韩成人| 日韩在线视频播放| 国产一区二区三区四区五区加勒比 | 久久这里只有精品18| 人妻无码久久一区二区三区免费| 久久综合五月天| 91久久国产综合久久91精品网站 | 99国产精品久久久久老师| 日韩久久久久久久| 久久国产精品首页| 国产黄色一级网站| 国产在线拍偷自揄拍精品| 亚洲自拍另类欧美丝袜| 九色一区二区| 国产肉体ⅹxxx137大胆| 亚洲不卡中文字幕无码| 国产精品美女在线播放| www久久99| 奇米影视首页 狠狠色丁香婷婷久久综合 | 久久婷婷国产麻豆91天堂| 不卡一卡2卡3卡4卡精品在| 日本久久久精品视频| 欧美激情视频一区二区三区不卡| 日韩有码在线视频| 波多野结衣久草一区| 欧美日本韩国一区二区三区| 亚洲一区中文字幕| 国产精品久久久久久久久久三级 | av一区二区在线看| 欧美大香线蕉线伊人久久 | 国产精品久久久久久久久久小说| 91精品国产自产在线老师啪| 免费看黄在线看| 日韩a在线播放| 伊人久久av导航| 国产精品久久久久久久久免费看| 久久久999视频| 成人国内精品久久久久一区| 黄www在线观看| 日韩精品―中文字幕| 正在播放国产精品| 久久精品视频中文字幕| 久久免费99精品久久久久久| 国产美女91呻吟求| 每日在线更新av| 欧美日韩国产精品一区二区| 无码无遮挡又大又爽又黄的视频| 欧美激情综合色| 国产精品美女久久久久av超清| 久久久久久久久久亚洲| 久久久性生活视频| 97国产精品人人爽人人做| 国产一级大片免费看| 欧美国产二区| 欧美日本亚洲| 欧洲日本亚洲国产区| 三区精品视频观看| 亚洲mm色国产网站| 在线日韩av永久免费观看| 国产精品久久久久久久久久东京 | 伊人婷婷久久| 久久久久久国产精品久久| 欧美成人精品在线观看| 国产精品久久久久久av下载红粉| 爽爽爽爽爽爽爽成人免费观看| 国产传媒久久久| 久久人人爽人人爽人人片av高请 | 久久精品国亚洲| 日韩视频免费看| 日日骚久久av| 日韩中文字幕免费视频| 国产盗摄xxxx视频xxx69| 久久久亚洲精品视频| 97久久精品国产| 99热成人精品热久久66| 91九色蝌蚪国产| 91精品国产精品| 久久五月天婷婷| 久久精品国产精品亚洲色婷婷| 国产成人a亚洲精品| 久久av综合网| 日韩在线一区二区三区免费视频| 日韩在线视频免费观看高清中文| 日韩视频一区在线| 国产精品久久久久高潮| 色与欲影视天天看综合网| 国产欧美在线一区| 国产欧美久久久久| 国产日本欧美在线| 99三级在线| 福利在线一区二区| 97碰在线观看| 国产黄色片免费在线观看| 久久久久久久久久亚洲| 国产精品偷伦一区二区| 国产精品黄色av| 久久久久久国产精品久久| 亚洲高清不卡一区| 亚洲成人第一| 日韩美女在线观看一区| 极品日韩久久| 国产玖玖精品视频| 久久久神马电影| 久久视频在线观看中文字幕| 九九九久久久| 久久综合88中文色鬼| 亚洲高清精品中出| 欧美午夜精品久久久久久蜜| 精品一区二区三区免费毛片| 国产美女久久久| 久久久免费精品| 国产精品美腿一区在线看| 在线精品日韩| 日本福利视频导航| 麻豆视频成人| 久久综合色视频| 国产精品久久久久影院日本| 一本久久a久久精品vr综合| 日韩av在线播放不卡| 蜜桃视频成人在线观看| 99精品国产一区二区| 日韩一区二区欧美| 久久99精品久久久久久青青91| 日日噜噜噜噜夜夜爽亚洲精品| 黄色录像特级片| 91av视频在线免费观看| 国产精品少妇在线视频| 亚洲第一在线综合在线| 国内一区在线| 久久视频在线观看中文字幕| 国产精品大全| 日韩人妻无码精品久久久不卡| 国产免费视频传媒| 久久久久久久网站| 岳毛多又紧做起爽| 欧美高清视频一区| 国产精品444| 精品国产一区二区三区久久久久久| 欧美一级在线看| 国产免费黄色av| 久久久www成人免费精品| 亚洲av综合色区| 国产免费成人在线| 久久精品国产99国产精品澳门 | 久久久久久久久一区| 在线播放豆国产99亚洲| 欧美精品卡一卡二| 久久久99爱| 亚洲在线观看视频网站| 蜜桃成人在线|