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

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

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

          9000px;">

                欧美岛国在线观看| 伊人开心综合网| 亚洲欧美偷拍卡通变态| 午夜精品久久久| 成人深夜视频在线观看| 欧美无砖砖区免费| 欧美国产精品久久| 男人操女人的视频在线观看欧美 | 久久夜色精品国产噜噜av| 亚洲精品欧美专区| 国产精品一区二区x88av| 9191久久久久久久久久久| 国产欧美日韩综合| 老司机精品视频线观看86| 欧美影院一区二区| 亚洲丝袜自拍清纯另类| 国产麻豆午夜三级精品| 91精品久久久久久久91蜜桃| 亚洲欧美日韩电影| 波多野洁衣一区| 国产亚洲美州欧州综合国| 免费在线看成人av| 欧美高清视频不卡网| 一区二区欧美视频| 色综合色狠狠天天综合色| 国产亚洲人成网站| 国产乱人伦精品一区二区在线观看| 在线视频亚洲一区| 自拍偷自拍亚洲精品播放| 国产suv精品一区二区6| 亚洲精品一区二区三区影院 | 色婷婷av一区二区三区gif| 国产精品美女久久久久久久久久久| 麻豆精品在线播放| 精品入口麻豆88视频| 午夜精品福利一区二区蜜股av| 91精品福利在线| 亚洲视频中文字幕| 91网址在线看| 亚洲精品免费播放| 在线观看www91| 亚洲韩国一区二区三区| 色婷婷一区二区| 亚洲成av人片一区二区| 欧美日韩另类一区| 亚洲午夜三级在线| 欧美一区二区精品久久911| 石原莉奈在线亚洲二区| 日韩欧美国产精品一区| 国产中文一区二区三区| 国产网站一区二区| 99精品热视频| 午夜久久福利影院| 欧美精品一区二区三区蜜桃 | 亚洲少妇30p| 欧美美女一区二区三区| 另类人妖一区二区av| 国产精品丝袜久久久久久app| 风流少妇一区二区| 亚洲国产精品一区二区久久 | 亚洲自拍另类综合| 欧美大片拔萝卜| 国产福利一区二区| 伊人色综合久久天天人手人婷| 欧美日韩中文另类| 国产精品1区2区| 伊人夜夜躁av伊人久久| 精品免费一区二区三区| 91丨九色porny丨蝌蚪| 日日噜噜夜夜狠狠视频欧美人| 久久久一区二区三区| av亚洲精华国产精华精华| 天堂一区二区在线| 国产日韩欧美精品在线| 欧美性大战久久| 精品一区二区在线看| 亚洲你懂的在线视频| 日韩丝袜情趣美女图片| 成人黄色软件下载| 免费观看在线色综合| 亚洲欧美综合网| 精品女同一区二区| 欧美三级资源在线| 国产 日韩 欧美大片| 日本怡春院一区二区| 自拍偷拍欧美激情| 久久久99精品免费观看| 欧美福利视频导航| 一本一道综合狠狠老| 国产一区 二区 三区一级| 亚洲成人在线观看视频| 日本一区二区三区在线观看| 7777女厕盗摄久久久| 91看片淫黄大片一级| 丁香激情综合国产| 经典三级在线一区| 婷婷国产v国产偷v亚洲高清| 亚洲乱码一区二区三区在线观看| 国产午夜精品久久| 久久久久久免费网| 日韩一级完整毛片| 666欧美在线视频| 欧美系列日韩一区| 91极品视觉盛宴| 一本色道**综合亚洲精品蜜桃冫| 丁香婷婷综合网| 国产高清不卡二三区| 国内精品嫩模私拍在线| 香蕉久久一区二区不卡无毒影院 | 久久综合国产精品| 精品三级在线看| 日韩限制级电影在线观看| 欧美影片第一页| 欧美性三三影院| 欧美日韩一区二区三区四区| 欧美日韩一区国产| 欧美精品三级在线观看| 欧美精品在线视频| 欧美一级日韩免费不卡| 欧美久久一二区| 日韩精品资源二区在线| 精品日产卡一卡二卡麻豆| 精品国产乱码久久久久久久久| 欧美一级久久久久久久大片| 日韩午夜激情av| 精品国产乱码久久久久久久久| 精品成人一区二区| 国产欧美一区二区三区网站 | 欧美精品一区二区精品网| 精品国产乱码久久久久久夜甘婷婷| 欧美哺乳videos| 国产网红主播福利一区二区| 国产精品初高中害羞小美女文| 亚洲精品写真福利| 免费欧美在线视频| 国产成人av福利| 91老师片黄在线观看| 777久久久精品| 久久久无码精品亚洲日韩按摩| 国产精品毛片无遮挡高清| 亚洲美女淫视频| 日本在线不卡一区| 成人免费毛片嘿嘿连载视频| 色吊一区二区三区 | 欧美日韩不卡在线| www欧美成人18+| 亚洲私人黄色宅男| 免费高清视频精品| 99在线精品一区二区三区| 欧美性欧美巨大黑白大战| 久久综合视频网| 亚洲一区中文在线| 高清在线观看日韩| 欧美老人xxxx18| 国产精品久久久久久久蜜臀| 亚洲综合一区二区| 国产白丝精品91爽爽久久| 欧美精品成人一区二区三区四区| 精品久久国产97色综合| 亚洲激情五月婷婷| 国产一区二区福利视频| 在线观看网站黄不卡| 久久久国产精品午夜一区ai换脸| 亚洲精品网站在线观看| 国产精品亚洲第一| 91 com成人网| 一区二区三区精品在线| 国产成人综合在线播放| 91精品蜜臀在线一区尤物| 亚洲精品视频在线观看网站| 国产激情视频一区二区在线观看 | 在线观看亚洲成人| 国产精品久久久久久亚洲伦| 蜜臀av性久久久久蜜臀av麻豆| 在线免费观看日本欧美| 日本一区免费视频| 国产一区二区网址| 欧美猛男gaygay网站| 亚洲三级电影网站| 不卡av电影在线播放| 欧美精品一区二区高清在线观看| 亚洲1区2区3区4区| 99综合影院在线| 韩国精品一区二区| 欧美高清性hdvideosex| 亚洲综合丝袜美腿| 色综合天天做天天爱| 国产日产欧产精品推荐色| 久久99日本精品| 日韩欧美的一区| 免费成人在线影院| 日韩免费电影一区| 日韩电影一区二区三区| 88在线观看91蜜桃国自产| 五月天丁香久久| 制服.丝袜.亚洲.另类.中文| 午夜成人在线视频| 欧美一区二区三区人| 日本vs亚洲vs韩国一区三区 | 欧美唯美清纯偷拍|