99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

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

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          亚洲在线黄色| 国产有码一区二区| 久久久91精品国产一区二区精品| 亚洲大片一区二区三区| 欧美日韩精品免费观看视频| 欧美在线综合| 亚洲在线成人精品| 亚洲美女av在线播放| 一区二区在线视频| 国产欧美精品在线播放| 欧美日韩ab片| 欧美激情第二页| 久久综合一区二区| 久久久久一区二区三区| 亚洲欧美中文字幕| 亚洲香蕉伊综合在人在线视看| 亚洲第一中文字幕| 在线观看亚洲一区| 在线精品视频在线观看高清| 国产一区深夜福利| 国产欧美一区二区在线观看| 国产精品99一区| 欧美日韩一区二区三区在线看| 欧美freesex交免费视频| 老司机一区二区三区| 欧美在线亚洲在线| 久久不射2019中文字幕| 欧美有码视频| 久久午夜精品| 老巨人导航500精品| 久久亚洲春色中文字幕| 久久午夜精品| 欧美成人视屏| 欧美精品一区二区三区蜜桃 | 亚洲国产91| 亚洲国产精品国自产拍av秋霞| 国内外成人免费激情在线视频网站| 国产精品一区二区三区久久| 国产精一区二区三区| 国产视频综合在线| 黄色一区二区三区| 亚洲欧洲日本一区二区三区| 亚洲精品网站在线播放gif| 99视频+国产日韩欧美| 亚洲小视频在线观看| 欧美一区二区成人| 久久亚洲精品一区二区| 欧美极品aⅴ影院| 欧美午夜久久久| 国产嫩草影院久久久久| 一区二区三区在线视频免费观看 | 亚洲性夜色噜噜噜7777| 先锋影音一区二区三区| 久久欧美中文字幕| 欧美日本免费一区二区三区| 国产精品呻吟| 亚洲国产小视频| 亚洲永久网站| 乱中年女人伦av一区二区| 欧美日韩国产精品自在自线| 国产日韩欧美一二三区| 亚洲欧洲在线一区| 午夜欧美精品| 欧美久色视频| 狠狠色狠狠色综合| 亚洲视频在线二区| 另类尿喷潮videofree| 欧美色精品在线视频| 在线观看视频亚洲| 亚洲一区二区视频在线观看| 久久在线免费| 国产午夜精品视频| 一本高清dvd不卡在线观看| 久久久精品999| 国产精品毛片大码女人| 亚洲精选久久| 久久综合给合| 国产精品一区久久久| 一区二区不卡在线视频 午夜欧美不卡在 | 欧美成人中文字幕在线| 国产亚洲成精品久久| 亚洲伊人网站| 欧美日韩国产色视频| 亚洲国产精品一区在线观看不卡 | 亚洲一区二区网站| 欧美日本视频在线| 亚洲国产毛片完整版 | 欧美亚洲综合另类| 欧美日韩美女在线观看| 亚洲国产精品一区二区第四页av| 欧美亚洲免费电影| 国产精品一区二区久久| 亚洲图色在线| 国产精品成人国产乱一区| 99亚洲一区二区| 欧美欧美天天天天操| 亚洲人成毛片在线播放| 欧美不卡福利| 91久久久亚洲精品| 欧美精品日韩综合在线| 亚洲国产国产亚洲一二三| 久久婷婷国产麻豆91天堂| 黄色一区二区在线| 久久婷婷蜜乳一本欲蜜臀| 国语自产精品视频在线看| 久久精品欧洲| 樱桃国产成人精品视频| 久久久噜噜噜| 亚洲国产精品一区二区久| 老妇喷水一区二区三区| 精品不卡一区| 欧美电影资源| 亚洲一区二区三区精品动漫| 国产精品视频九色porn| 欧美一区二区三区日韩| 国产手机视频一区二区| 久久精品一区二区三区不卡牛牛| 国产乱人伦精品一区二区| 久久久久久高潮国产精品视| 亚洲动漫精品| 欧美日韩中文在线观看| 欧美亚洲免费在线| 在线看成人片| 欧美午夜国产| 久久人人97超碰国产公开结果| 亚洲国产成人在线播放| 欧美色视频日本高清在线观看| 亚洲影视在线| 亚洲国产二区| 国产精品日韩高清| 久久福利视频导航| 亚洲精品视频二区| 国产伦精品一区二区| 蜜桃久久精品一区二区| 亚洲午夜久久久| 亚洲国产高清在线观看视频| 国产精品你懂的| 欧美插天视频在线播放| 亚洲一区在线观看视频 | 亚洲激情视频在线| 国产日本欧美一区二区| 欧美精品一区二区视频 | 久久黄色级2电影| 在线视频你懂得一区二区三区| 国产一区二区高清视频| 欧美日韩在线第一页| 狼狼综合久久久久综合网| 亚洲男人的天堂在线| 99re66热这里只有精品3直播| 国产美女一区二区| 欧美视频精品在线观看| 久久一区二区三区四区五区| 亚洲一区中文| 99精品福利视频| 亚洲成人在线视频播放| 国产一区二区成人久久免费影院| 欧美日韩mp4| 欧美成人资源| 欧美电影资源| 欧美大片在线观看一区二区| 久久久91精品国产一区二区精品| 亚洲色图自拍| 亚洲午夜久久久久久久久电影网| 亚洲精品一区二区网址| 亚洲人成网站在线播| 亚洲国产一区二区精品专区| 黄色成人av在线| 狠狠色狠狠色综合日日五| 国语自产精品视频在线看抢先版结局 | 韩国成人福利片在线播放| 国产欧美日韩激情| 国产片一区二区| 国产美女诱惑一区二区| 国产亚洲精品久久飘花| 国产日韩免费| 国语自产偷拍精品视频偷| 国产欧美在线| 国产一区二区三区直播精品电影 | 亚洲欧美日韩在线播放| 亚洲欧美日韩国产综合在线| 先锋亚洲精品| 久久男女视频| 欧美成人精品影院| 欧美视频国产精品| 国产精品久久久久影院亚瑟| 国产精品久久午夜夜伦鲁鲁| 国产精品一区毛片| 国产一二精品视频| 亚洲韩日在线| 一区二区三区久久精品| 亚洲欧美日韩区| 久久香蕉国产线看观看av| 欧美电影在线观看完整版| 欧美日韩久久不卡| 国产日本欧洲亚洲| 亚洲国产精品国自产拍av秋霞| 一本色道精品久久一区二区三区| 亚洲欧美日韩在线高清直播| 久久精品国产亚洲a| 欧美激情亚洲视频|