16 bit arithmatic in 8 bit ansi C - TechRepublic
Question
October 21, 2013 at 07:36 AM
tonymorton

16 bit arithmatic in 8 bit ansi C

by tonymorton . Updated 12 years, 7 months ago

I have two 14 bit numbers held in 8 bit variables, upper 6 bits in one variable and lower 8 bits in another. My processor is only 8 bits. I need to compare the second number with the first and if it is larger I need to increase the first number by 1. If it is smaller I need to decrease the first number by 1. Exit if they are the same.

This discussion is locked

All Comments