+1-415-315-9853

info@mywordsolution.com

## Engineering

 Civil Engineering Chemical Engineering Electrical & Electronics Mechanical Engineering Computer Engineering Engineering Mathematics MATLAB Other Engineering Digital Electronics Biochemical & Biotechnology

problem 1: prepare a function which has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For illustration, when n = 5 is passed to the function, the function will return 0x20 (Note that 0x20 is 00000000 00000000 00000000 00100000).

problem 2: prepare a function which has two int parameters num and n, and returns TRUE when the nth bit in num is 1, otherwise FALSE. This function must use the function in the above problem (1). (Be careful how to handle Boolean values in C.)

problem 3: prepare down a function which has a single int parameter n and returns an int: 0 if n is negative, or else 1. You are not allowed to simply check the integer value, and must use the function in the above problem (2).

problem 4: prepare down a function which has four unsigned char parameters, combines the four one-byte integer values into an unsigned integer, and returns the unsigned integer. When the four one-byte integers are combined, the first value should be used for the first byte in the resulting unsigned integer, the 2nd value for the second byte, the 3rd value for the 3rd byte, and the 4th value for the last byte.

problem 5: prepare down a function which has int parameter n, makes another kind of mask having n bit 1’s from the left most bit and 32- n bit 0’s next. The mask is called netmask in this seminar, and the function will return the netmask. (Note that a netmask consists of two parts of bit 1’s and bit 0’s.)

problem 6: prepare a function which has two unsigned int parameters of an IPv4 address (that is, an unsigned int) and a netmask (that is, an unsigned int), and returns the network id part in the IPv4 address. (Note that the network id part in an IPv4 address is obtained from the address by clearing some bits that are indicated by the bit 0’s in a netmask.)

problem 7: prepare down a function to check odd-parity of a given int parameter. That is that the function returns 1 when the number of bit 1's is odd, or else 0.

problem 8: prepare a main function which tests all the functions in (1) – (7).

•    The test data can be hard-coded in the main function, and each function must be tested at least 5 times.
•    The main function must appear before any other functions.
•    When you print integers, you must use the format specifier printing integers in the hexadecimal notation.
•    You mut use only one C file for this assignment.
•    You must not put any printf() in the functions in (1) – (7).

Computer Engineering, Engineering

• Category:- Computer Engineering
• Reference No.:- M91798

Have any Question?

## Related Questions in Computer Engineering

### What buckets are used in fig 2313 to answer queries of the

What buckets are used in Fig. 23.13 to answer queries of the form "how many l's in the most recent k bits?" if k is (a) 10 (b) 15 (c) 20? What are the estimates for each of these queries? How close are the estimates?

### Compare and contrast database backup amp disaster

Compare and contrast Database Backup & Disaster Planning. This research paper will describe, compare and contrast Database Backup & Disaster Planning. • This paper will be 5 pages total: • (a) Describe Database Backup - ...

### A what is a triggerb what is the relationship between a

a. What is a trigger? b. What is the relationship between a trigger and a table or view? c. Name nine possible trigger types. d. Explain, in general terms, how new and old values are made available to a trigger. e. Descr ...

### We assume that efg corporation has two business offices

We assume that EFG Corporation has two business offices. These offices are in the cities of Orlando and Miami. These cities are located 220 miles apart. We assume that there are 3 employees in Orlando and 6 employees in ...

References Please Include Originality Verification Below 15% There are Java compilers and interpreters. Write a 3 page paper on compilers and interpreters (2-3 paragraphs on each topic). Your paper must include the follo ...

Please cite all the answers properly. No plagiarism. Please mention all the questions in the assignment and cite it and complete only step 4.  1 )  Watch the following video on how to brief a case: https://www.youtube.co ...

### As part of the organizations continued growth strategy

As part of the organization's continued growth strategy, executives want to adopt a more mobile workforce and have asked you to research and present your findings on the potential use of mobile and cloud technology solut ...

### Selection can also be performed on bags give a map reduce

Selection can also be performed on bags. Give a Map Reduce implementation that produces the proper number of copies of each tuple t that passes the selection condition. That is, produce key-value pairs from which the cor ...

### Look at these two pieces of codea clc b for loop 1 to 4

Look at these two pieces of code:A: CLC B: FOR Loop = 1 TO 4 LDX #0 INPUT Number1, Number2 loop: LDA A,X Sum = Number1 + Number2 ADC B,X PRINT Sum STA C,X NEXT INX CPX #16 BNE loop (a) Which of these pieces of code is wr ...

### Write the c code for a function that receives five double

Write the C++ code for a function that receives five double numbers: four by value and one by reference. Name the formal parameters num1, num2, num3, num4, and avg. The function should calculate the average of the four n ...

• 13,132 Experts

## Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

### A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

### What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

### Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

### Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

### Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate