CSCE236EmbeddedSystems,Spring2015Exam2
Monday,May4th,2015
Instructions:Youwillhavethefullclassperiodtocompletethistest.Makesuretoshowyourworktoensureyoureceivepartialcreditifyour?nalanswerisincorrect.Thisisaclosedbookquiz,nocomputers,textbooks,notes,etc.areallowed.Unlessotherwisespeci?ed,assumethatquestionsarereferringtotheArduinos/Atmelprocessorswehavebeenusinginclass.
Name(2pts.):
Problem1.Hexandbitoperations(allreferencestobitlocationsarezeroreferenced).ForeachbitoperationsubproblemwriteasinglelineofCcodetoachievethedesiredresult.
a)(5pts.).Settheupper5bitsinthe8-bitvariablefoototheupper5bitsinthe16-bitvariablebar.b)(5pts.).Setthelower5bitsvariablevartoones.
c)(5pts.).Whatisthevalue(inhex)ofthe8-bitvariableafterthisoperationvar=((12<<6)|(3<<6))+7?d)(5pts.).Whatisthevalueof((0x236>>3)-3)inhex?
1
http://www.99jianzhu.com/包含内容:PDF/word/ppt 流程,表格,案例,最新作文 数学 英语 考试题库等内容免费下载。