Forum Discussion
Altera_Forum
Honored Contributor
16 years agoA further note on shifting:
imagine your data is 15bits if data = Ox00ff (255) shift 4 bits towards sign bit to become Ox0ff0 (or Ox0ff&four internal bits if available). = 4080 = 16 x 255 or shift 4 bits towards LSB to become Ox000f = 15 =~ 255/16 if your data = Ox7FFF (your example) = -1 shift 4 bits towards sign bit to get Ox7FF0 = -16 or 4 bits towards LSB to get Ox7FFF = -1 (this is the odd case, woudn't divide)