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

  Give the highest test score and the name of the students

I need a C++ program that reads students' names followed by their test scores. The program should output each student's name followed by the test scores and the relevant grade. It should too find out and print the highest test score and the name o..

  It discussion

Using the airlines example mentioned above, propose several possible IT solutions and how they would benefit a smaller airline to become more successful or attract more clients.

  Save the punch in or punch out date

Display an input field called "Choice" to input one of the four options - Inputting an incorrect option shall display a prompt indicating that the input was invalid and to try again.

  1 write a script to help users calculate compressed file

1. write a script to help users calculate compressed file size. prompt the user to enter the original size of a file

  Web designers use cookies and session variables to

discuss how an object must be an expert on certain sets of information.nbspvisit a business online web presence.

  Express currently used tools and recommended measures

Web phishing, pharming and vishing are popular web based scams. examine currently used tools and recommended measures to defeat this kind of attacks efficiently? Specifically focus on solutions that can be implemented at the network infrastructure ..

  List and in brief describe the five-component model of an

list and briefly explain the five-component model of an information system. how can you use them?your response should

  Using a while structure for designing pseudocode

By using a WHILE structure for designing the pseudocode in order to prepare a monthly report for the legal clinic.

  More detail to be shown as a process is exploded

In data flow diagrams (DFDs), a process symbol can be referred to as a black box, becase the inputs, outputs, and general funcions of the process are known, but the underlying details and logic of the system are hidden.

  Explain condition is met and a program to approximate

I just want to learn and see done programs with all these things. If their is a way to keep them mostly the same so I may compare to see differences this is good.

  What numbers are in the memory location

Suppose you are required to load an 8-bit value in memory location at $7001 into accumlator A using the index addressing mode. What numbers are in the memory location $C100 and $C101 after the progrram is executed

  Is this an ethical question or just a matter of office

as a new systems analyst at premier financial services you are getting quite an education. youreport to mary the it

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