how verilog code hexadecimal numbers?

Status
Not open for further replies.

r_image_processing

Newbie level 1
Joined
Aug 19, 2014
Messages
0
Helped
0
Reputation
0
Reaction score
0
Trophy points
0
Activity points
0
Suppose i want to add two hexadecimal numbers like AB and 1F. How we add it ?
so first i need to change it into decimal and then add it ? or it can directly add? Please give me some hints.
:|
 

Do you want to assign these two hexadecimal numbers to two different inputs of FPGA?
If this is the case, then follow this:
For example you have two inputs. A and B. Both are 8 bits wide. You want to assign AB to A-input and 1F to B-input. Then use following code:
A=8'hAB;
B=8'h1F;
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…