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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          国产精品爽黄69| 久久精品视频在线看| 国产麻豆视频精品| 麻豆精品在线观看| 亚洲欧美日韩在线| 亚洲精品久久久久久久久久久久久 | 亚洲高清久久久| 国产欧美一区二区精品性| 欧美成人tv| 久久九九有精品国产23| 亚洲尤物视频网| 亚洲国产成人精品久久| 国产一区二区在线观看免费播放| 欧美日韩91| 免费成人黄色| 国产精品久久午夜夜伦鲁鲁| 欧美mv日韩mv亚洲| 久久香蕉国产线看观看网| 午夜精品久久久久久久久久久久| 亚洲国产精品免费| 一区二区亚洲精品国产| 国产婷婷97碰碰久久人人蜜臀| 欧美午夜大胆人体| 欧美日本精品一区二区三区| 欧美国产极速在线| 欧美高清视频免费观看| 欧美xxx在线观看| 快she精品国产999| 免费视频一区| 欧美国产日韩a欧美在线观看| 久久中文字幕一区| 久热国产精品| 欧美~级网站不卡| 免费不卡在线观看| 欧美精品一区二区三区蜜桃| 欧美精品偷拍| 国产精品www色诱视频| 国产精品福利在线观看| 国产欧美精品一区| 国产日韩欧美三区| 精品999久久久| 亚洲乱码国产乱码精品精可以看| 欧美午夜在线视频| 欧美日韩国产黄| 欧美日韩在线视频观看| 国产精品视频精品视频| 国产一区二区三区在线观看网站| 国产亚洲人成网站在线观看| 激情综合中文娱乐网| 亚洲国产婷婷香蕉久久久久久| 亚洲三级色网| 亚洲一区免费看| 久久久免费av| 欧美日韩久久| 好吊日精品视频| 亚洲精品在线观| 亚洲一区精品电影| 鲁大师影院一区二区三区| 亚洲特级片在线| 久久久久中文| 欧美三级视频在线| 一区二区在线观看视频| 国产日韩精品在线| 亚洲欧洲日产国产综合网| 亚洲自拍另类| 农村妇女精品| 国产亚洲在线| 亚洲天天影视| 亚洲综合精品| 欧美大学生性色视频| 国产精品毛片一区二区三区| 在线免费不卡视频| 亚洲图片欧美日产| 欧美国产日韩精品免费观看| 国产日产欧产精品推荐色 | 久久久999精品| 欧美日一区二区三区在线观看国产免 | 亚洲欧美日韩一区在线观看| 久久青青草原一区二区| 国产精品国产三级国产普通话三级| 伊人久久亚洲影院| 欧美一区二区三区在线观看视频| 欧美日韩精品三区| 一区二区在线观看视频| 欧美有码视频| 国产欧美日韩综合精品二区| 欧美视频在线免费| 亚洲国产精品成人va在线观看| 欧美亚洲午夜视频在线观看| 欧美日韩一区二区高清| 在线观看亚洲a| 亚洲欧洲日韩在线| 久久亚洲欧美国产精品乐播| 国产乱码精品| 欧美在线短视频| 国产精品专区h在线观看| 亚洲香蕉伊综合在人在线视看| 欧美福利网址| 亚洲欧洲精品一区二区三区不卡 | 久久―日本道色综合久久| 国产精品一区二区三区免费观看| 一区二区免费在线观看| 欧美激情成人在线视频| 最新国产乱人伦偷精品免费网站| 久久在线视频| 亚洲国产婷婷综合在线精品| 久久中文精品| 亚洲区在线播放| 欧美日韩一区二区三区在线观看免| 亚洲激情成人| 欧美日韩综合另类| 午夜影院日韩| 激情成人在线视频| 美女福利精品视频| 一本久久综合| 国产亚洲精品资源在线26u| 久久亚洲综合色| 91久久久亚洲精品| 欧美视频一区在线观看| 午夜久久福利| 在线精品高清中文字幕| 欧美日韩播放| 欧美一区二区精品在线| 在线观看视频欧美| 欧美日韩视频不卡| 欧美一区二区网站| 在线欧美不卡| 国产精品黄色在线观看| 久久精品官网| 在线视频日韩| 好吊色欧美一区二区三区视频| 免费一级欧美在线大片| 亚洲自拍三区| 亚洲国产高清在线| 国产精品伦一区| 久久婷婷久久| 午夜在线成人av| 亚洲人成网站色ww在线| 国产视频自拍一区| 欧美人体xx| 蜜桃av一区二区在线观看| 亚洲私人影院在线观看| 在线播放国产一区中文字幕剧情欧美| 欧美视频在线观看免费网址| 久久久久久亚洲精品中文字幕 | 欧美性片在线观看| 久久久久在线观看| 亚洲欧美网站| 在线一区二区三区四区| 在线观看视频免费一区二区三区| 国产精品久久久久久福利一牛影视 | 欧美久久久久| 久久夜色精品| 久久精品国产在热久久| 亚洲自拍偷拍麻豆| av成人国产| 99re8这里有精品热视频免费 | 亚洲精品免费网站| 尤物yw午夜国产精品视频明星| 国产视频一区二区在线观看| 欧美日韩免费区域视频在线观看| 久久永久免费| 欧美综合激情网| 欧美影院在线播放| 久久av一区二区三区| 欧美一二三视频| 午夜精品婷婷| 欧美中文在线视频| 久久成人精品一区二区三区| 午夜在线观看欧美| 性欧美超级视频| 欧美影院成年免费版| 久久av一区二区三区| 欧美中在线观看| 久久久久网址| 欧美福利视频在线| 欧美日本精品| 国产精品青草综合久久久久99| 国产精品二区二区三区| 国产精品久久久久久模特| 国产精品一区二区久久久久| 国产日韩欧美在线播放不卡| 国产欧美日韩亚洲| 精品二区视频| 亚洲毛片在线观看| 亚洲午夜影视影院在线观看| 亚洲一区二区三区在线视频| 午夜激情综合网| 老牛嫩草一区二区三区日本 | 在线成人中文字幕| 日韩亚洲精品电影| 亚洲一区二区在线| 久久久久久亚洲综合影院红桃| 蜜臀av一级做a爰片久久| 欧美日韩在线看| 国产网站欧美日韩免费精品在线观看| 激情另类综合| 99综合在线| 久久国产精品久久w女人spa| 欧美国产日韩精品|