So the bold digits are 1 and the others are 0. (Notice the bold digits sum up to the hex value above. Let's apply these steps to the hex number (4FA) 16 Step 5: Read the 1’s and 0’s from left to right to get the binary equivalent of the given hex number.Write down 0 below those that are not used. Step 4: Write down 1 below those 8, 4, 2 and 1’s that are used.Give me some ideas here is my code module binary2BCD( input 13:0 binary, output reg 15:0 o ) reg 29:0 But it does not work well. If your hex number is 2, only 2 is used 8, 4 and 1 are not. Im trying to make 14 bit binary to 4 digit bcd. For example, if one of your hex values is 10, this means 8 and 2 sum up to 10 (4 and 1 are not used). ![]() Step 3: Determine which powers of two (8, 4, 2 or 1) sum up to your hex digits.Write these numbers (8, 4, 2 and 1) below the hex values. The rightmost digit equals to 2 0 (1), the next one equals to 2 1 (2), the next one equals to 2 2 (4) and the leftmost one equals to 2 3 (8). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |