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

          国产精品高清一区二区三区| 久久久综合视频| 一区二区三区在线观看欧美| 欧美日韩一区二区三区高清| 亚洲欧美久久久久一区二区三区| 亚洲丶国产丶欧美一区二区三区 | 久久久久国产精品一区二区| 亚洲美女免费视频| 精品福利免费观看| 国产午夜精品一区二区三区视频| 欧美日韩色婷婷| 欧美激情一二三区| 男人的天堂亚洲| 久久不射网站| 午夜亚洲影视| 亚洲欧美国产精品专区久久| 亚洲伦理自拍| 亚洲国产精品va| 一区二区视频免费完整版观看| 国产美女精品视频| 国产精品日本精品| 国产精品豆花视频| 欧美性猛交99久久久久99按摩 | 久久久久久久网站| 午夜精品久久久久久久99水蜜桃| 中国成人亚色综合网站| 一区二区欧美国产| 亚洲午夜未删减在线观看| 99精品视频免费观看视频| 亚洲精品综合| 99国内精品久久久久久久软件| 亚洲精品国精品久久99热| 亚洲国产精品国自产拍av秋霞| 亚洲高清网站| 亚洲欧洲中文日韩久久av乱码| 亚洲激情六月丁香| 99re6这里只有精品| 一区二区三区免费看| 亚洲网址在线| 亚洲欧美日本伦理| 久久精品国产久精国产爱| 久久精品一区二区国产| 欧美中文在线免费| 欧美96在线丨欧| 欧美日韩一区二区三区在线| 国产精品美女久久久久久2018| 国产精品免费一区二区三区在线观看 | 欧美成人dvd在线视频| 欧美jizz19hd性欧美| 欧美日韩人人澡狠狠躁视频| 国产精品三上| 一区精品在线| 亚洲午夜在线观看| 久久久久久久91| 欧美日韩一区二区免费在线观看| 国产美女精品免费电影| 亚洲二区在线视频| 亚洲图片在线观看| 久久综合九色综合欧美狠狠| 欧美日韩的一区二区| 国产婷婷97碰碰久久人人蜜臀| 亚洲第一区色| 亚洲欧美日本精品| 欧美精品九九99久久| 国产午夜亚洲精品羞羞网站| 亚洲国产一区二区三区a毛片| 亚洲一区二区视频在线观看| 另类成人小视频在线| 国产精品免费视频观看| 亚洲电影网站| 欧美伊久线香蕉线新在线| 欧美日韩123| 国内外成人免费激情在线视频 | 欧美va亚洲va国产综合| 国产精品激情| 亚洲激情电影在线| 久久九九有精品国产23| 国产精品久久久久久久久免费| 亚洲第一区中文99精品| 欧美一区成人| 国产精品高潮呻吟久久av黑人| 在线播放日韩| 久久久国产精彩视频美女艺术照福利| 欧美日韩黄视频| 亚洲国产日韩欧美在线图片| 欧美亚洲在线| 国产精品福利久久久| 一本久久知道综合久久| 欧美精品999| 亚洲国产美女| 欧美激情亚洲国产| 在线观看欧美日韩| 久久国产精品久久久久久久久久| 欧美日韩色婷婷| 99在线观看免费视频精品观看| 欧美不卡在线视频| 在线观看日产精品| 久久免费视频在线观看| 国内精品久久久久影院 日本资源| 亚洲专区在线视频| 欧美午夜精品久久久久久超碰| 99人久久精品视频最新地址| 欧美岛国激情| 亚洲黄色小视频| 欧美日韩免费精品| 一本一本久久a久久精品综合妖精| 欧美日韩高清在线一区| 国产精品99久久久久久人| 国产精品国产三级国产普通话三级| 亚洲老板91色精品久久| 欧美午夜宅男影院| 午夜精品一区二区三区在线播放| 国产伦理一区| 久久久国产精品一区二区中文| 国产综合网站| 欧美韩国日本综合| 一区二区三区欧美日韩| 国产欧美日韩中文字幕在线| 久久久久久久一区二区| 亚洲国产欧美国产综合一区| 欧美日韩中文另类| 欧美在线观看www| 在线观看日韩国产| 欧美午夜视频| 久久最新视频| 亚洲一区在线免费| 亚洲第一视频| 国产精品日韩精品欧美精品| 久久精彩视频| 一区二区不卡在线视频 午夜欧美不卡在| 欧美日韩亚洲一区二| 久久成人亚洲| 一本色道久久综合亚洲精品婷婷| 国产日韩欧美三区| 欧美精品国产一区| 香蕉视频成人在线观看| 亚洲日本aⅴ片在线观看香蕉| 国产精品免费网站在线观看| 免费成人性网站| 午夜激情久久久| 一区二区高清在线观看| 在线观看久久av| 国产精品一区在线观看| 欧美连裤袜在线视频| 久久精品国产欧美亚洲人人爽| 亚洲欧洲在线看| 国产在线欧美日韩| 国产精品卡一卡二卡三| 欧美ab在线视频| 久久精品一二三| 欧美一区二区三区电影在线观看| 亚洲精品美女91| 亚洲二区在线视频| 国产综合在线看| 国产日韩在线一区| 国产精品国产成人国产三级| 欧美精品一区二区久久婷婷| 久久人人97超碰人人澡爱香蕉| 亚洲午夜久久久| 一区二区三区高清在线| 亚洲精品国产精品乱码不99按摩| 在线观看成人av电影| 经典三级久久| 狠狠色狠狠色综合日日91app| 国产精品一级二级三级| 国产精品久久久免费| 欧美视频在线观看一区| 欧美婷婷久久| 欧美亚洲成人精品| 欧美性片在线观看| 欧美日韩天堂| 欧美色123| 国产欧美精品| 国产午夜亚洲精品羞羞网站 | 亚洲在线成人| 香蕉久久国产| 久久综合给合| 欧美精品亚洲精品| 欧美三级电影精品| 国产日韩欧美自拍| 一区在线视频| 亚洲精品永久免费精品| 中国女人久久久| 香蕉久久精品日日躁夜夜躁| 欧美中文字幕不卡| 久久午夜精品一区二区| 欧美精品v日韩精品v韩国精品v | 日韩亚洲成人av在线| 一区二区91| 欧美在线观看一区二区三区| 裸体女人亚洲精品一区| 欧美精品一区二区在线播放| 国产精品久久久久久久久动漫| 国产一区二区三区四区五区美女| 激情五月综合色婷婷一区二区| 亚洲欧洲在线免费| 亚洲欧美久久久| 理论片一区二区在线| 欧美日韩一区二区在线播放| 国产精品一区二区三区观看|