Help with nibbles: Solved
Oldbitcollector (Jeff)
Posts: 8,091
Could someone tell me why..
cn1:=11110000 (High Nibble padded with 0's)
cn2:=00000011 (Low Nibble padded with 0's)
total:=cn1+cn2
debug.bin(total,8)
generates 01111011 instead of 11110011 I'm looking for?
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Post Edited (Oldbitcollector) : 11/4/2009 3:16:05 AM GMT
cn1:=11110000 (High Nibble padded with 0's)
cn2:=00000011 (Low Nibble padded with 0's)
total:=cn1+cn2
debug.bin(total,8)
generates 01111011 instead of 11110011 I'm looking for?
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Post Edited (Oldbitcollector) : 11/4/2009 3:16:05 AM GMT
Comments
[noparse][[/noparse]code]
cn1:=%11110000
cn2:=%00000011
total:=cn1+cn2
Fixed! (For now)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Ha.....rookie mistakes will get you every time.
I was posting while you were.......you are stealing the air from my sails.
James
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!