please Use C programming
Part 1: One Character Create a program that prints one character, similar to the above example. Your program must Use loops to generate the 8x8 pattern - o At least one loop for the rows o At least one loop for the columns Create the 8x8 pattern from an encoded number "image" (eg. 64-bit unsigned integer) o Use an "unsigned long int" datatype for your 64-bit encoded number Alternately use the "uint64_t" datatype. Be sure to add the line: #include
o The encoded number con be hard-coded (i.e. a constant integer). It does not hove to come from user input. . Use "Ox in front of the number in your code to tell the compiler it's hexodecimal. HINT 1: In your row loop, you will need to extract 8 bits from the 64-bit number each time it loops. Use math operators or use bitwise operators to isolate the proper 8 bits out of the 64 for that row. HINT 2: In your column loop, you will need to focus on just one bit of the 8-bit row number each time it loops. Use math or bitwise operators to mask or isolate the bit that corresponds to the column the loop is currently printing. Example Image Print Algorithm Consider the 64-bit image Ox10387cfe38383800: Loop 1 (start at row 0, byte 0): Isolate the lowest byte: 1038cf 393928 Loop 2: (start at Colunn 0, bit 7: 00 byte d) Isolate the highest bit 0 Loa D000 (bit 7} Is it a zero? Print a space Is it a one? Print an asterisk Repeat for columns 1-7 using bits 6-0) Repeat for rows 1-7 using bytes 1-7) To test your code, try the following encoded integers: - 0x1018fcfefc181000 -10387cfe38383800 Recommendation: Although it isn't a requirement, you should consider to write your matrix printing routine as a function separate from main. Such a function would simply take a unit64 t as the only variable input (the "image" to be printed), and it would not need to return anything. Refer to your book or online resources for information on how to write and use functions in C Part 2: Implement a Complete Font Modify your code from Part 1 such that it can print any letter (upper or lowercase) that the user enters Your code will print the letter as a star pattern on the console. Example 1: The star pattern image for A is Coding Help: Fonts 8x8 matrix fonts are available on the Internet. Here is an example website The matrix in the middle of the screen is the 8x8 dot/star pattern. You can click on the matrix to create your own character or icon. The code on the right side of the screen under "Arduino/C Code" is the variable declaration and initialization statement you would paste into your code. At the left side of the screen are complete fonts. There are three font sets to choose from. Click on 'letters' from any of the font sets. Now, on the right side of the screen, you should have an array declaration and initialization statement for the entire alphabet, including upper and lower cases. Paste the code into your main() function. You may need #include at the top of your program. Info: stdint.h is a set of variable definitions you can use to ensure that you get an integer of a specific size. (Recall the byte sizes of the named ints are not all guaranteed from one machine type to another.) uint64 means "unsigned integer 64 bits. On most machines, you could likely get the same type using: unsigned long int Now that you have the font loaded as an array of uint64's, you can get the code for any letter by using an index on the array. Looking at the website from earlier, you can see that the upper case letters come first followed by the lowercase letters, in alphabetical order. Therefore, the index for A' is 0(the first symbol in the array), and the index for 'a' is 26 (the next symbol after Z'). Uppercase letters indices are 0-25 Lowercase letters are indices 26-51. Example 2 (Your Code): Here is some example code you could use to get the correct symbol from your font array: First, you need a variable to store the chosen symbol's font: uint64 t currentSymbol: unsigned char userInput int inageIndexi if (isUpper userinput) // storage for the current inage /I stores what the user types // index of the current inage image Index user1nput- *A.; // use this for upperca se image Index user Input- 'a.; // use for lowercase currentSymbol IMAGES tinage IndexI ; // number in brackets selects the image You will need to include code to ask the user to input a letter. You will also need code to check whether the input is valid (is a character). If the input is not valid, your program should ask the user to try again using a loop to get back around to the user input code. Consult the textbook and/or online sources if you need help with arrays. Once you have this working properly, you can pass currentSymbol to your matrix printing routine you created in