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

          9000px;">

                一本色道a无线码一区v| 精品国产凹凸成av人网站| 91精品国产91久久久久久一区二区| 久久久精品一品道一区| 国产成人精品一区二区三区四区 | 日韩欧美高清一区| 蜜臀久久久久久久| 国产欧美精品在线观看| 色吊一区二区三区| 久久69国产一区二区蜜臀| 日本一区二区不卡视频| 在线观看国产日韩| 国产原创一区二区三区| 亚洲啪啪综合av一区二区三区| 欧美日韩精品系列| 国产成人亚洲精品狼色在线| 亚洲尤物视频在线| 2020国产精品自拍| 一本在线高清不卡dvd| 一区二区三区日韩欧美| 精品国产亚洲在线| 精品视频在线视频| 另类小说一区二区三区| 亚洲人妖av一区二区| 欧美成va人片在线观看| 色婷婷精品大在线视频| 国产高清不卡二三区| 亚洲在线视频一区| 中文字幕免费在线观看视频一区| 欧美日韩精品免费| 99久久精品免费观看| 久久99精品网久久| 亚洲第一在线综合网站| 中文一区在线播放| 亚洲精品一区二区三区在线观看| 欧美日韩和欧美的一区二区| 成人高清免费观看| 国产乱码精品一区二区三区av| 亚洲一区中文在线| 国产精品不卡在线| 国产视频一区不卡| 欧美精品一区二区在线观看| 7777精品伊人久久久大香线蕉超级流畅 | 蜜乳av一区二区| 亚洲午夜一区二区三区| 26uuu色噜噜精品一区| 欧美日韩高清在线| 欧美午夜电影在线播放| 日本久久一区二区| 91免费小视频| 色婷婷激情综合| 在线观看三级视频欧美| 在线观看亚洲a| 日本高清不卡在线观看| 91丨porny丨户外露出| 99久久综合色| 色综合久久88色综合天天| 色婷婷久久久亚洲一区二区三区| 成人在线一区二区三区| 岛国av在线一区| 91视频免费播放| 欧洲一区在线电影| 欧美片在线播放| 欧美不卡在线视频| 国产欧美精品一区| 亚洲免费av观看| 性做久久久久久免费观看| 丝袜美腿亚洲综合| 韩国av一区二区| 成人精品国产免费网站| 处破女av一区二区| 欧美色视频一区| 欧美一区二区在线免费播放| 欧美精品一区二区精品网| 久久久亚洲精品石原莉奈| 欧美高清在线精品一区| 亚洲精品成人精品456| 日本中文在线一区| 国产精品77777| 91蜜桃传媒精品久久久一区二区| 91国产免费观看| 欧美日韩mp4| 国产视频在线观看一区二区三区| 国产精品免费久久| 夜色激情一区二区| 蜜臀久久久久久久| 91香蕉视频污| 欧美成人国产一区二区| 中文字幕日本不卡| 免费黄网站欧美| 91美女在线观看| 日韩一区二区三区免费看| 国产精品青草久久| 日本成人在线网站| 99久久国产免费看| 精品99一区二区| 五月激情综合网| 成人美女在线视频| 欧美第一区第二区| 亚洲一区二区成人在线观看| 国产精品888| 日韩精品一区二区三区蜜臀 | 国产精品三级电影| 亚洲va欧美va人人爽午夜| 丁香网亚洲国际| 日韩欧美一级特黄在线播放| 亚洲免费观看高清完整版在线观看熊| 蜜臀av一区二区在线观看| 97aⅴ精品视频一二三区| 日韩视频一区在线观看| 怡红院av一区二区三区| 国产电影精品久久禁18| 日韩欧美中文一区| 日韩一区精品字幕| 欧亚一区二区三区| 一区二区在线看| 成人黄色国产精品网站大全在线免费观看 | 精品一区二区三区视频在线观看| 91色乱码一区二区三区| 国产精品国产三级国产aⅴ中文 | 久久99精品国产麻豆婷婷洗澡| 99久久精品免费看| 国产蜜臀av在线一区二区三区| 日韩成人一级大片| 91麻豆精品国产91| 五月婷婷久久丁香| 欧美精品777| 日韩精品久久久久久| 欧美精品三级日韩久久| 婷婷夜色潮精品综合在线| 欧美亚洲动漫精品| 三级一区在线视频先锋 | 久久精品水蜜桃av综合天堂| 久久99精品久久只有精品| 欧美一区二区精品| 轻轻草成人在线| 精品免费99久久| 国产成人aaa| 亚洲图片激情小说| 欧美亚洲国产bt| 日本欧美大码aⅴ在线播放| 4438x亚洲最大成人网| 麻豆freexxxx性91精品| 久久无码av三级| 国产成人精品免费| 一区二区三区欧美激情| 欧美精品少妇一区二区三区| 久久丁香综合五月国产三级网站| 国产日韩精品视频一区| 99久久99久久精品免费看蜜桃 | 久久国产精品露脸对白| 国产人妖乱国产精品人妖| 成人精品在线视频观看| 亚洲动漫第一页| wwwwxxxxx欧美| 色诱亚洲精品久久久久久| 亚洲一区二区三区自拍| 欧美一级日韩一级| 成人免费视频免费观看| 三级影片在线观看欧美日韩一区二区| 欧美精品一区二区三区高清aⅴ| 99综合影院在线| 免费欧美高清视频| 亚洲视频免费在线观看| 日韩视频免费观看高清在线视频| 国产suv精品一区二区883| 五月天丁香久久| 亚洲丝袜自拍清纯另类| 欧美在线免费观看视频| 免费欧美在线视频| 亚洲欧洲av在线| 久久亚洲综合色一区二区三区| 波多野结衣精品在线| 蜜臀久久久99精品久久久久久| 亚洲日本成人在线观看| 精品美女一区二区| 91影院在线观看| 国产专区欧美精品| 丝袜a∨在线一区二区三区不卡| 精品国产一区二区三区久久影院| 99国产一区二区三精品乱码| 韩国成人福利片在线播放| 亚洲一区二区三区小说| 精品国产伦一区二区三区观看方式 | 精品一区二区三区在线观看国产 | 91国产免费看| 国产成人在线视频播放| 麻豆91在线看| 日韩中文字幕av电影| 国产精品福利一区| 精品欧美一区二区久久 | 欧美日韩一区不卡| 豆国产96在线|亚洲| 国产一区二区看久久| 三级久久三级久久| 亚洲6080在线| 亚洲国产成人高清精品| 综合中文字幕亚洲| 国产精品美女久久久久久久久久久| 久久久综合精品|