Course Solutions Uncategorized (Solved) : Consider Following C Function 1 Char R Char Input Char 8 Bits 2 Length Stores Number Bits Q26491352 . . . .

(Solved) : Consider Following C Function 1 Char R Char Input Char 8 Bits 2 Length Stores Number Bits Q26491352 . . . .

 

Consider the following C function:
1 char r( char input ) { // a char has 8 bits
2 // length stores the number of bits of ‘input ’
3 unsigned int length =8;
4 unsigned int i=0;
5 char result =0;
6 char temp =0;
7 for (i =0; i< length ; ++i) {
8 if (( input & 1) == 1) {
9 temp = temp | 1;
10 }
11 result = temp;
12 input = input >> 1;
13 temp = temp << 1;
14 }
15 return result ;
16 }
Implement the function as an entity in VHDL (including entitydeclaration and architecture). You can use
only concurrent statements.

Expert Answer


An

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post