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

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

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

時間:2024-02-08  來源:合肥網(wǎng)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編程
  • 無相關信息
    合肥生活資訊

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

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    日韩免费在线观看视频| 精品国产一区二区三区日日嗨 | 蜜桃网站成人| 色妞一区二区三区| 日韩在线三区| 91国语精品自产拍在线观看性色| 久久99久久99精品中文字幕| 国产一区不卡在线观看| 国产精品青青在线观看爽香蕉| 日韩精彩视频| 九九久久99| 日本精品一区二区三区视频| 久久九九视频| 亚洲中文字幕无码一区二区三区| 国产欧美日韩免费看aⅴ视频| 欧美乱大交xxxxx| 国语精品免费视频| 国产精品久久久久影院日本| 黄色片一级视频| 国产精品福利在线观看| 麻豆精品蜜桃一区二区三区| 国产精品第100页| 国产日韩欧美日韩大片| 欧美精品xxx| 99久久久精品视频| 懂色av粉嫩av蜜臀av| 久久久欧美精品| 日韩欧美精品久久| 久久久久久久影院| 欧美中文在线观看| 国产精品久久久久久久久男| 国产在线精品日韩| 色中色综合影院手机版在线观看| 国产精品一区二区电影| 亚洲熟妇无码一区二区三区导航| 91九色国产视频| 人妻无码一区二区三区四区| 国产精品免费在线| 国产精品一区二区三区免费视频| 亚洲一区二区免费在线| 久久这里只有精品8| 青春草在线视频免费观看| 国产精品美女在线| 免费国产一区二区| 一区二区日本伦理| 久久精品国产一区二区三区不卡 | 久久久亚洲精品无码| 日本视频精品一区| 国产精品美腿一区在线看 | 欧美日韩高清区| 久久资源亚洲| 黄色片视频在线播放| 九九久久综合网站| 国产极品在线视频| 欧美人与动牲交xxxxbbbb| 欧美激情一级精品国产| 国产成人精品日本亚洲| 国内精品久久久久| 亚洲国产一区二区在线| 久久久av一区| 91九色在线观看| 韩国成人一区| 欧美一级中文字幕| 国产精品户外野外| 久久久久久艹| 国产一区在线免费| 亚洲一区二区三区免费看| 国产成人一区三区| 国产一区二区中文字幕免费看| 在线观看福利一区| 久久久久久久激情视频| 国产欧美一区二区三区不卡高清| 婷婷四房综合激情五月| 国产精品久久久久久免费观看| 91国视频在线| 国产日韩欧美在线| 欧美亚洲另类激情另类| 亚洲人久久久| 国产精品国产精品国产专区蜜臀ah | 国产福利精品视频| 黄网站色视频免费观看| 午夜精品久久久久久久男人的天堂| 久久久精品国产| 国产精品2018| 国产精品综合久久久久久| 欧美在线免费观看| 亚洲免费不卡| 九色91av视频| 国产精品私拍pans大尺度在线| 8050国产精品久久久久久| 黄色一级一级片| 午夜精品美女久久久久av福利| 国产精品成人av性教育| 久久久久欧美| 国产精品18久久久久久麻辣 | 天天综合色天天综合色hd| 精品国产一区二区三区麻豆免费观看完整版 | 国产av第一区| 国产精品男女猛烈高潮激情| 国产高清精品软男同| 99爱精品视频| 国产精品专区在线| 久久精品人人做人人爽| 久久国产精品久久| 91精品天堂| 福利在线一区二区| 国产原创精品| 国产自产精品| 美日韩免费视频| 欧美怡红院视频一区二区三区| 亚洲精品永久www嫩草| 欧美精品做受xxx性少妇| 国产精品乱码视频| 日韩中文理论片| 日韩一区在线视频| 久草青青在线观看| 久久久久久久国产精品视频| 国产mv免费观看入口亚洲| 久久精品一区二| 久久久最新网址| 久久频这里精品99香蕉| 久久青青草原| 久久9精品区-无套内射无码| 久久久综合亚洲91久久98| 99亚洲精品视频| 超碰国产精品久久国产精品99| 国产精品亚洲综合天堂夜夜| 国产日韩av在线播放| 国产日韩欧美自拍| 高清无码视频直接看| 91免费国产精品| 国产富婆一区二区三区| 久久久久久久久网站| 日韩中文字幕视频| 久久精品一本久久99精品| 精品国内自产拍在线观看| 国产精品欧美激情在线观看| 久久五月天色综合| 欧美日韩成人在线播放| 欧美激情精品久久久| 中文字幕一区综合| 少妇精品久久久久久久久久| 日韩色妇久久av| 激情五月五月婷婷| 国产美女三级视频| 91精品国产99久久久久久红楼| 91九色偷拍| 日韩中文字幕在线观看| 国产精品久久久久久久app| 精品视频9999| 亚洲一区二区中文字幕| 日本一区二区高清视频| 青青精品视频播放| 国产自偷自偷免费一区| 国产伦精品一区二区三区| 成人中文字幕在线播放| 91精品国产91久久久久麻豆 主演 91精品国产91久久久久青草 | 精品高清视频| 日韩专区第三页| 欧美另类一区| 国产伦精品一区二区三区视频免费| av免费观看网| 久久久久久久久久久人体| 国产精品高清在线观看| 天天操天天干天天玩| 欧美日韩一区在线播放| 国产精品自产拍在线观看中文| 国产美女精品视频| 国产成人亚洲综合91| 国产精品国产三级欧美二区| 亚洲a级在线观看| 欧美亚洲视频在线观看| 高清国产一区| 日韩在线视频观看正片免费网站| 精品国产免费一区二区三区| 婷婷久久青草热一区二区| 麻豆久久久av免费| 久久久午夜视频| 欧美精品一区在线播放| 日韩在线三区| 国产精品一区二区免费在线观看| 久久久久久国产免费| 欧美大片欧美激情性色a∨久久 | 狠狠噜天天噜日日噜| 97免费高清电视剧观看| 国产精品久久久久久久av大片 | 日韩欧美亚洲在线| 成人久久久久久久久| 精品国产视频在线| 日韩一区不卡| 国产免费黄视频| 国产精品视频26uuu| 亚洲欧洲一区二区福利| 国产综合色香蕉精品| 久久福利电影| 亚洲av综合色区| 国产免费一区二区三区四在线播放 | 亚洲五码在线观看视频| 国产综合久久久久久| 久久久久久欧美精品色一二三四 |