Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add hex values together

Status
Not open for further replies.

simpson

MIS
Oct 23, 2001
58
CA
looking for some code that will add hex values together. Anyone have anything?

Simpson
 
Use bc command
[tt]
home/jp> H1=ABC
home/jp> H2=333
home/jp> echo "obase=16;ibase=16; $H1 + $H2" | bc
DEF
[/tt]

obase = output number radix
ibase = input number radix

Jean Pierre.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top