ECE 272 Organization of Computers Spring 2022ECE 2220 System Programming Concepts1 of 2 Lab 3 – Bitwise Ops – Octal and Hex Objectives In this lab, each student is to write a menu-driven program...

1 answer below »
Needs to be in C-Language


ECE 272 Organization of Computers Spring 2022ECE 2220 System Programming Concepts1 of 2 Lab 3 – Bitwise Ops – Octal and Hex Objectives In this lab, each student is to write a menu-driven program called p3.c that allows a user to convert between quaternary, octal, and hexadecimal formats. The student should gain and exhibit an understanding of: · Storage types and binary representations. · Formatted input and output · Processing input · Bitwise Operators Function The program should prompt the user (with clear directions) to enter a quaternary (base 4), octal (base 8), or hexadecimal (base 16) number (up to 32 digits) and then convert and display that number in the other two formats. Input A quaternary number should be preceded by the symbol ‘Q’; an octal number should be preceded by an ‘O’; and a hexadecimal number should be preceded by an ‘H’. The program should loop continuously showing an input prompt until a certain exit command is given. This exit command (keyphrase) can be of your choosing, but should be logical and displayed in the user instructions. Output Upon entering a number, the program should display the equivalent number in the other two formats. For example, if the string Q1230 (which is equal to 01101100 in binary) is input by the user, then the program should display the octal and hexacdecimal numbers O154 and H6C If the string O7654 (which is equal to 111110101100 in binary) is input by the user, then the program should display the quaternary and hexadecimal numbers Q332230 and HFAC And, if the string HBAD (which is equal to 001000010100 in binary) is input by the user, then the program should display the quaternary and octal numbers Q020110 and O1024 Further Considerations There are many ways to solve this problem in C. Your program, however, must use bitwise operators (&, |, <) to produce the transformations from one base to another. your program should be structured neatly, easily readable, and well commented. furthermore, variable and function names should be such that the software is as “self-commenting” as possible. creation and submission work must be completed by each individual student, and only that student. students must not use code from another student or copied from a book or internet source. students must not allow other students to copy from their code or make it possible for students to do so by making their code available to be copied. sharing of code will not be tolerated and will be tested for. any such act of cheating will result in failing the class and may result in dismissal from the university. use the following line to compile your program gcc -wall -g p3.c -o p3 [-lm] the code you submit must compile using the –wall flag and no compiler errors or warnings should be printed. to receive credit for this assignment your code must compile and at a minimum perform some required function. code that does not compile or crashes before performing some required function will not be accepted or graded. all students must do a final check on one of the ces ubuntu machines to verify that gcc using ubuntu shows no warning messages before submitting your project. submit your program on canvas before midnight on monday, february 21st. mp1 grading criteria name:final score: ece 222 mp1 grading criteria late deduction: correctness 50 points compiles compiler warnings runs requires fix errors when reading code array boundary violation correct input format correct output format a series of test scripts are run against your code. code design 25 points no global variables named constants header files structured design deviations from required design documentation 25 points comment block at top of each file purpose assumptions known bugs function comments inline comments meaningful names to="" produce="" the="" transformations="" from="" one="" base="" to="" another.="" your="" program="" should="" be="" structured="" neatly,="" easily="" readable,="" and="" well="" commented.="" furthermore,="" variable="" and="" function="" names="" should="" be="" such="" that="" the="" software="" is="" as="" “self-commenting”="" as="" possible.="" creation="" and="" submission="" work="" must="" be="" completed="" by="" each="" individual="" student,="" and="" only="" that="" student.="" students="" must="" not="" use="" code="" from="" another="" student="" or="" copied="" from="" a="" book="" or="" internet="" source.="" students="" must="" not="" allow="" other="" students="" to="" copy="" from="" their="" code="" or="" make="" it="" possible="" for="" students="" to="" do="" so="" by="" making="" their="" code="" available="" to="" be="" copied.="" sharing="" of="" code="" will="" not="" be="" tolerated="" and="" will="" be="" tested="" for.="" any="" such="" act="" of="" cheating="" will="" result="" in="" failing="" the="" class="" and="" may="" result="" in="" dismissal="" from="" the="" university.="" use="" the="" following="" line="" to="" compile="" your="" program="" gcc="" -wall="" -g="" p3.c="" -o="" p3="" [-lm]="" the="" code="" you="" submit="" must="" compile="" using="" the="" –wall="" flag="" and="" no="" compiler="" errors="" or="" warnings="" should="" be="" printed.="" to="" receive="" credit="" for="" this="" assignment="" your="" code="" must="" compile="" and="" at="" a="" minimum="" perform="" some="" required="" function.="" code="" that="" does="" not="" compile="" or="" crashes="" before="" performing="" some="" required="" function="" will="" not="" be="" accepted="" or="" graded.="" all="" students="" must="" do="" a="" final="" check="" on="" one="" of="" the="" ces="" ubuntu="" machines="" to="" verify="" that="" gcc="" using="" ubuntu="" shows="" no="" warning="" messages="" before="" submitting="" your="" project.="" submit="" your="" program="" on="" canvas="" before="" midnight="" on="" monday,="" february="" 21st.="" mp1="" grading="" criteria="" name:="" final="" score:="" ece="" 222="" mp1="" grading="" criteria="" late="" deduction:="" correctness="" 50="" points="" compiles="" compiler="" warnings="" runs="" requires="" fix="" errors="" when="" reading="" code="" array="" boundary="" violation="" correct="" input="" format="" correct="" output="" format="" a="" series="" of="" test="" scripts="" are="" run="" against="" your="" code.="" code="" design="" 25="" points="" no="" global="" variables="" named="" constants="" header="" files="" structured="" design="" deviations="" from="" required="" design="" documentation="" 25="" points="" comment="" block="" at="" top="" of="" each="" file="" purpose="" assumptions="" known="" bugs="" function="" comments="" inline="" comments="" meaningful="">
Answered 4 days AfterFeb 16, 2022

Answer To: ECE 272 Organization of Computers Spring 2022ECE 2220 System Programming Concepts1 of 2 Lab 3 –...

Nidhi answered on Feb 19 2022
106 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here