国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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 豆包網頁版入口 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    中日韩在线视频| 日本天堂免费a| 久久五月天色综合| 黄色一区三区| 国产av不卡一区二区| 国产成人精品一区二区三区福利| 欧美精品自拍视频| 久久99亚洲热视| 国产精品老女人精品视频| 欧美在线亚洲在线| 日韩中文字幕网站| 黄色一级免费大片| 欧美在线精品免播放器视频| 欧美巨猛xxxx猛交黑人97人| 成人毛片一区二区| 日韩一二区视频| 国产精品日韩一区二区免费视频| 国产精品自拍视频| 日韩中字在线观看| 国产精品极品尤物在线观看| 国产精品美女午夜av| 久久这里只有精品视频首页| 国产精品99久久久久久人| 日本精品一区二区三区在线播放视频 | 欧美自拍视频在线| 国内精品二区| 日韩中文在线字幕| 日韩欧美一区二区三区四区 | 一区二区三区视频在线播放| 在线精品日韩| 日韩中文在线字幕| 欧美一级爱爱视频| 国产青青在线视频| 日韩欧美视频第二区| 久久国产精品久久久久久| 欧美激情图片区| 天天爽天天狠久久久| 国产精品久久久久久久乖乖| 久久综合伊人77777| 亚洲一区二区三区精品在线观看| 国产精品少妇在线视频| 久久99久国产精品黄毛片入口| 都市激情久久久久久久久久久| 欧美日韩亚洲综合一区二区三区激情在线| 国产日韩亚洲欧美在线| 欧美 日韩 国产精品| 99中文字幕| 高清一区二区三区日本久| 97免费视频观看| 国产美女精品在线观看| 久久久亚洲成人| 99在线视频免费观看| 日日噜噜噜夜夜爽亚洲精品| 国产精品成人久久久久| 欧美一级视频在线观看| 国产一区二区在线视频播放| 国产成人精品免费看在线播放| 成人av播放| 国产精品无码一区二区在线 | 欧美在线视频一区| 国产精品亚洲一区二区三区| 久久九九亚洲综合| 性色av一区二区咪爱| 国产乱子伦精品| 国产精品日韩av| 日本免费黄视频| 91久久久久久久| 欧美日本亚洲视频| 毛片一区二区三区四区| 久久精品成人欧美大片| 午夜精品www| 国产精品一区二区3区| 国产精品高清在线| 精品人妻少妇一区二区| 久久久久久久影院| 久久久久久网站| 亚洲综合自拍一区| 色播亚洲婷婷| 苍井空浴缸大战猛男120分钟| 久久久国产影院| 日本新janpanese乱熟| 99在线精品免费视频| 一区精品视频| 国产免费成人在线| 国产999视频| 粉嫩av免费一区二区三区| 色综合久久久久久中文网| 国产综合福利在线| 91免费在线视频| 中文字幕精品一区日韩| 国产一区二区高清不卡| 久久av在线播放| 国内精品国产三级国产99| 国产精品欧美久久久| 人人爽久久涩噜噜噜网站| 国产suv精品一区二区| 日韩小视频在线播放| 色av中文字幕一区| 欧美精品一区在线| 国产精品免费一区| 国产在线一区二区三区欧美 | 精品久久久三级| 精品日本一区二区| 久久中文久久字幕| 成人国产一区二区三区| 亚洲va国产va天堂va久久| 日产国产精品精品a∨| 久久久免费看| 亚洲18私人小影院| 国产成人在线免费看| 精品中文字幕在线观看| 国产伦精品一区二区三区免| 最新欧美日韩亚洲| 久久精品午夜一区二区福利| 人妻无码视频一区二区三区| 国产精品老女人视频| 草莓视频一区| 欧美中文字幕第一页| 国产精品视频500部| 国产精品香蕉在线观看| 日日碰狠狠丁香久燥| 国产精品视频在线免费观看| 国产伦精品一区二区三区视频黑人| 久久久免费av| 国产麻豆一区二区三区在线观看| 亚洲高清视频一区二区| 日韩在线观看免费| 成人av影视在线| 欧美亚洲伦理www| 一道本在线观看视频| 日韩视频在线观看免费| 国产精品一区专区欧美日韩| 日韩高清专区| 一区二区三区四区视频在线观看| 九色自拍视频在线观看| 国产精品亚洲不卡a| 欧美亚洲精品日韩| 午夜精品一区二区三区在线观看| 日韩中文字幕网站| av资源站久久亚洲| 国自在线精品视频| 日本网站免费在线观看| 欧美日本在线视频中文字字幕| 久久久久国产精品熟女影院| 国产视频一区二区视频| 日韩欧美在线一区二区| 最新欧美日韩亚洲| 国产精品免费看一区二区三区 | 9191国产视频| 一区二区三区免费看| 国产成人精品999| 国产精品一国产精品最新章节| 欧美亚洲另类制服自拍| 午夜一区二区三区| 精品国产免费人成电影在线观...| 九九九九久久久久| 91精品国产亚洲| 国产精品一区二区久久久久| 国内成+人亚洲| 日韩精品无码一区二区三区免费| 亚洲欧美精品在线观看| 欧美日韩成人黄色| 欧美成人精品一区| www.日韩视频| 久久亚洲免费| 超碰网在线观看| 国产精品欧美亚洲777777| 欧美一级爱爱视频| 日韩一级片播放| 欧美激情一二区| 国产精品毛片一区视频| 日韩在线播放视频| 国产成人精品999| 91精品国产91久久久久福利| 国产精品一区二区久久| 国产欧美最新羞羞视频在线观看| 国内精品视频一区| 国模私拍视频一区| 欧美一区深夜视频| 欧美性在线观看| 欧美在线播放cccc| 欧美做暖暖视频| 欧美怡红院视频一区二区三区| 日韩精品久久久| 日本精品免费视频| 日韩啊v在线| 日韩人妻一区二区三区蜜桃视频| 日本欧洲国产一区二区| 日韩欧美一区二区视频在线播放| 日韩精品手机在线观看| 欧洲亚洲一区二区| 欧美日韩国产一二| 黄色大片中文字幕| 黄黄视频在线观看| 国产欧美综合一区| www.中文字幕在线| 国产成人一区二| 久久视频在线免费观看| 国产精品久久久久7777| 欧美成人在线影院|