Find the express code that corresponds to the service tag

Assignment Help Computer Engineering
Reference no: EM13986489

Solve the following problems and hand them in at the beginning of class on the due date. You may use a basic calculator, but you must show how you got your answer. 

Write out the solutions neatly. Problems should be in order. Stack the pages neatly with the cover sheet on top and put a single stable in the upper left corner. Make sure the staple does not obscure any of your writing.

Fill in the page numbers of the source code and output for problems 11 and 12 on the cover sheet.

  1. Convert to decimal: 0x2c7b
  2. Convert to binary: 0x2c7b
  3. Convert from decimal to binary: 437
  4. Convert from decimal to hexadecimal: 437
  5. Determine the output of the following code segment (without running it):
    Assume that an int is 32 bits.
    unsigned a = 157;
    unsigned b = 234;
    unsigned c = ~a;
    unsigned d = a & b;
    unsigned e = a | b;
    unsigned f = a ^ b;
    printf("%u %u %u %u %u %u\n",a,b,c,d,e,f);
    
  6. Write a code segment that uses shifts to multiply the unsigned int x by 37.
  7. Using an 8-bit word, find the binary representation of -47 in
    1. two's complement
    2. ones' complement
    3. sign-magnitude
  8. Using a 16-bit word, find the binary representation of -47 in
    1. two's complement
    2. ones' complement
    3. sign-magnitude
  9. Assume that a short is represented by 11 bits and an int is represented by 17 bits.
    What is the output generated by the following code segment:
    int x = 5123;
    int y = -5123;
    short sx = (short)x;
    short sy = (short)y;
    printf("%d %d %d %d\n",x, y, (int)sx, (int)sy);
    printf("%x %x %x %x\n",x, y, (int)sx, (int)sy);
    printf("%u %u %u %u\n",x, y, (int)sx, (int)sy);
    
    You may use a calculator to generate the values, but you must show how you calculated them.
  10. Dell computers have a unique alpha-numeric service tag consisting of digits and upper case letters. When you call Dell technical support, they would like to know the service tag number so that they can appropriately route your call. One way to automate this is to have you type in your service tag number. Since there is no convenient way to uniquely type letters on a standard telephone keypad, Dell also gives you an express code, which is a decimal number calculated from the service tag. The calculation algorithm is simple: the service tag is treated as a base-36 number, where A=10, B=11, etc. 
    Find the express code that corresponds to the service tag: H32Y1F1. You must show how you got your answer.
  11. Write a C program called convert2hex.c that takes a single command line parameter, a decimal number. It starts by outputting your full name. It converts the number to hexadecimal using the method described on the top of page 36 of the text. It outputs the results as it goes along. For each hexadecimal digit it displays a line showing how that digit was created and finally displays a line containing the final result. All output goes to standard output.
    Example:
    If I wrote the program,
    convert2hex 314156
    would generate the following output:
    Abdullah Muzahid
    314156 = 19634 * 16 + 12 (C)
     19634 = 1227 * 16 + 2   (2)
      1227 = 76 * 16 + 11    (B)
        76 = 4 * 16 + 12     (C)
         4 = 0 * 16 + 4      (4)
    0x4CB2C
    
    Note the use of upper case letters and that the equal signs and hexadecimal digits created are lined up.
    You may assume that the number being converted is greater than 0 and less than 263.
    Hint: first write and debug the program, not worrying about lining up the output.
    Run your program with each of the following command line parameters and include the output.
    1. 314156
    2. 2147483647
    3. 11806310474565
    4. 8526495043095935640
  12. Write a C program called convert2base.c that is similar to convert2hex.c, but has 2 command line parameters, the first being an integer in the range 2 though 36, and the second being a decimal number. Instead of converting to base 16, the base used is given by the first parameter.
    Example
    If I wrote the program,
    convert2base 23 314156
    would generate the following output:
    Abdullah Muzahid
    314156 = 13658 * 23 + 22 (M)
     13658 = 593 * 23 + 19   (J)
       593 = 25 * 23 + 18    (I)
        25 = 1 * 23 + 2      (2)
         1 = 0 * 23 + 1      (1)
    12IJM
    
    Run your program with each of the following command line parameters and include the output.
    1. 23 314156
    2. 2 2147483647
    3. 31 263429442133726086
    4. 36 3881091294471582038

Reference no: EM13986489

Questions Cloud

Caclulate the acceleration of the blocks : Sketch a free body diagram for each block, identify all forces acting on the block. Caclulate the acceleration of the blocks. Calculate the tension in the rope.
What is the magnitude of the pushing force : The 10-cm-wide, zero-resistance slide wire shown in (Figure 1) is pushed toward the 1.5 Ω resistor at a steady speed of 0.40 m/s . The magnetic field strength is 0.30 T,  What is the magnitude of the pushing force?
What was ungers net income for 2012 : The following is a list of selected events for Unger Sales and Service for 2012. Unger uses a perpetual inventory system and had a zero inventory balance prior to these transactions. What was Unger's net income for 2012? Compute gross margin for 2012..
Complete the income statement and the balance sheet : Calculate missing amounts, retained earnings, cash, income taxes, income before tax, operating expenses.
Find the express code that corresponds to the service tag : Find the express code that corresponds to the service tag: H32Y1F1. You must show how you got your answer - For each hexadecimal digit it displays a line showing how that digit was created and finally displays a line containing the final result.
Draw the free-body diagram for the block : Draw the free-body diagram for the block. Determine the block's acceleration as it slides down the inclined plane. Is your answer reasonable? Why or why not?
Prepare the intangible assets section of the balance sheet : Patrick Corporation's adjusted trial balance contained the following asset accounts at December 31, 2014: Prepare the intangible assets section of the balance sheet.
Find angle through which it rotated during the acceleration : A disk rotating at 8 rad/s is accelerated at the rate of 1.8 rad/s2 for 7 s. What is its new angular speed? Find the angle through which it rotated during the acceleration.
Explain how to perform task clearly effectively and quickly : Find a mechanism or product around your home and write instructions on how-to install or operate that item. I would like to see at least one graphic in your document. Explain how to perform a task clearly, effectively, and quickly. Adapt to the rea..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Transmitting message and tentative checkpoint

Is node P allowed to transmit the messages related to application (as opposed to message which is part of checkpoint algorithm itself) immediately after having taken a tentative checkpoint?

  Pros and cons of these three approaches

It is possible to design and edit web pages in a number of ways. For example, we could edit HTML tags by hand, use a visual editor such as Dreamweaver or use an HTML generator to edit a layout and then create the HTML from it.

  Conduct a comparison of three uml modeling tools of your

conduct a comparison of three uml modeling tools of your choice.your paper should include the following headers and

  How is the material standard developed

How is the material standard developed? Why are the quantities shown in the bill of materials not always the same quantities should in the standard cost card

  Write down a paper comprising of 500-1000 words

write a paper consisting of 500-1000 words double-spaced on the security effects of cryptographic tunneling based on an

  What do you mean by the tip

"How to Use JavaScript to Liven up your Web site, how to protect users whose browsers will not load JavaScript. What is the tip? would Web site designers write JavaScript code so all browsers can use it? Why?

  As a software engineer youve been asked to write a paper

as a software engineer you have been asked to write a paper that describes the use of current technologies with regard

  What is difference between system analysis and system design

What is the difference between systems analysis and systems design? First discuss the aims of each of them (systems analysis and systems design) and how these aims are achieved.

  Create application for an "automotive repair shop"

Create Visual Basic.NET application for an "Automotive Repair Shop". Below are the needed.

  Create the system dfd

Create the Context DFD, create the System DFD and give a 5-minute presentation on your teams solution

  Why the client receives both the web page

assume you click on a link within your Web browser to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS look-up is necessary to obtain the IP address.

  Formulate the problem as an ip and find out the optimal

the record-a-song company has contracted with a rising star to record eight songs. the sizes in mb of the different

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd