Design and implemention (in Verilog) of a combinational circuit that performs the toUpper() function on one ASCII character. This circuit has an 8-bit input and an 8-bit output.
Function specification:
This combinational circuit converts a lowercase English letter (like 'a', 'b', 'c', etc.) to its uppercase form (like 'A', 'B', 'C'). It uses 8 bits of input (ASCII code) and produces 8 bits of output.
Technology Agonistic Algorithm:
- ASCII code is the number given to every character on a computer. For example: o 'A' = 65 (in decimal) = 0x41 (in hexadecimal) o 'a' = 97 (in decimal) = 0x61 (in hexadecimal) To detect lowercase letter, the input character is checked to be in the range [97, 122] decimal, which corresponds to ['a', 'z'].
- Lowercase ASCII letters follow a specific binary pattern:
o Bit 7 (Most Significant Bit) = 0 o Bit 6 = 1 o Bit 5 = 1 o Bits 4 - 0 encode the specific letter Base Pattern: 011xxxxx - The only difference between a lowercase letter and its uppercase form is exactly 32 (decimal) or 0010 0000 (binary).
• ′𝑎′ = 01𝟏00001 • ′𝐴′ = 01𝟎00001 The conversion requires flipping bit 5. That bit is 1 for lowercase and 0 for uppercase. - If the character is not lowercase (for example, 'A', '1', ' '), it is left unchanged.