加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

CS 61程序代做、代寫C/C++編程設(shè)計(jì)

時(shí)間:2024-02-08  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



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.
如有需要,請(qǐng)加QQ:99515681 或WX:codehelp

掃一掃在手機(jī)打開當(dāng)前頁(yè)
  • 上一篇:CISC3025代做、代寫Java,c++設(shè)計(jì)編程
  • 下一篇:代寫Computer Security and Networks編程
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開團(tuán)工具
    出評(píng) 開團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    99久久婷婷国产综合精品首页| 欧美女优在线视频| 香蕉国产精品| 日韩美女精品| 国产人成精品一区二区三| 午夜久久福利| 国产精品中文字幕制服诱惑| 在线精品一区| 88xx成人免费观看视频库| 99在线观看免费视频精品观看| 一区二区三区四区视频免费观看| 日韩精品色哟哟| 日韩免费看片| 一本色道久久综合| 99精品美女| 日韩极品在线观看| 欧美国产激情| 一区二区高清| 深夜成人在线| 日本久久黄色| 99国产精品| 久久国产亚洲| 精品视频国产| 日韩av黄色在线| 伊人国产精品| 麻豆一区二区99久久久久| 日韩视频网站在线观看| 免费欧美在线视频| 一本久道久久综合婷婷鲸鱼| 精品久久久久久久| 午夜久久av| 国产一区二区三区四区大秀| 欧美激情视频一区二区三区在线播放 | 动漫av一区| 久久伦理中文字幕| 国产精品一区二区av日韩在线| 欧美日本一区二区高清播放视频| 成人综合网站| 亚洲国产伊人| jizz久久久久久| 日本肉肉一区| 四虎在线精品| 国产精品99久久久久久董美香 | 一区二区三区中文| 久久精品久久99精品久久| 亚洲精品555| 亚州欧美在线| 欧美在线1区| 日本伊人色综合网| 麻豆成人在线观看| 国产精品国码视频| 麻豆国产精品一区二区三区| 日本午夜一本久久久综合| 国产日韩精品视频一区二区三区 | 麻豆精品新av中文字幕| 免费在线播放第一区高清av| 日本中文字幕不卡| 欧美人成在线| 国产成人免费av一区二区午夜| 国产精品嫩草影院在线看| 国产午夜一区| 永久免费精品视频| 高清欧美性猛交xxxx黑人猛| 精品人人人人| 欧美一区二区麻豆红桃视频| 免费久久久久久久久| 午夜日本精品| 日韩精品一级中文字幕精品视频免费观看 | 日本美女一区| 久久久国产精品网站| 日韩国产成人精品| 999久久久国产999久久久| 日韩黄色小视频| 久久精品凹凸全集| 午夜欧美精品| 91久久夜色精品国产按摩| 超级碰碰久久| 久久精品人人做人人爽电影蜜月| 在线观看一区| 日韩欧美中文在线观看| 色88888久久久久久影院| 亚洲精品国产偷自在线观看| 丝袜亚洲精品中文字幕一区| 麻豆国产在线| 免费在线成人| 久久精品99久久久| 成人精品国产| 欧美日韩1区| 日本中文字幕在线一区| 亚洲一区图片| 亚洲欧洲日本mm| av资源网在线播放| www.26天天久久天堂| 欧美国产高潮xxxx1819| 日韩精品一区二区三区中文在线| 久久97久久97精品免视看秋霞| 亚洲成人高清| 国产中文字幕一区二区三区| 日韩精品一级| 激情综合网五月| 国产精品久久久久久影院8一贰佰| 欧美中文字幕精在线不卡| 综合激情网站| 精品久久不卡| 免费在线成人网| 日韩精品电影在线| 91亚洲无吗| 欧美日韩视频| 欧美区一区二| 国产免费av国片精品草莓男男| 在线成人动漫av| 亚洲男人av| 欧美第一在线视频| 一区二区美女| 日韩在线观看| 欧美一级大片在线视频| 999精品一区| 日韩在线第七页| 欧美第一在线视频| 欧美美女一区| 亚洲国产天堂| 日韩在线观看一区二区三区| 狠狠入ady亚洲精品| 国模视频一区| 国产精品伦一区二区| 色999久久久精品人人澡69| 91麻豆精品国产综合久久久| 欧美日韩麻豆| 美女91在线看| 国产真实有声精品录音| 婷婷久久一区| 欧美成人一二区| 9999久久久久| 在线最新版中文在线| 精品一区二区三区中文字幕| 欧美99久久| 欧美一区=区| 欧美三级乱码| 99在线精品免费视频九九视| 日韩高清电影一区| 亚洲午夜91| 久久精品网址| 欧美大片aaaa| 欧美日韩伊人| 香蕉久久夜色精品| av在线亚洲一区| 亚洲欧美bt| 亚洲调教一区| 理论片午夜视频在线观看| 蜜桃精品视频| 五月天国产在线| 91欧美极品| 久久久久久久久久久久久久久久久久久久| 日韩高清成人在线| 色喇叭免费久久综合网| 欧美极品在线观看| 久久都是精品| 精品网站999| 日韩大片在线观看| 日本电影一区二区| 欧美v亚洲v综合v国产v仙踪林 | 欧美丝袜一区| 日韩综合小视频| 一本久久知道综合久久| 国产精品嫩草影院在线看| 蜜桃av噜噜一区二区三区小说| 精品中文字幕一区二区三区四区 | 国产乱码午夜在线视频| 日韩电影在线看| 在线观看精品| 黑人操亚洲人| 国产一区二区三区91| 日韩精品2区| 99久久www免费| 国产精品一级在线观看| 国产在线美女| 久久一区二区中文字幕| 综合天天久久| 亚洲国产福利| 欧美99久久| 婷婷亚洲成人| 国产成人精品一区二区三区免费 | 视频精品一区二区| theporn国产在线精品| 国内精品伊人| 亚洲主播在线| 国产色噜噜噜91在线精品| 亚洲色图欧美| 蜜桃av.网站在线观看| 欧美特黄一区| 99国产精品久久一区二区三区| 一区二区三区国产在线| 丝袜美腿亚洲色图| 色愁久久久久久| 亚洲制服欧美另类| 青青草国产成人av片免费| 日韩dvd碟片| 天天做天天爱综合| 欧美三级乱码| 国产成人三级|