View Single Post
  #4   Spotlight this post!  
Unread 08-04-2012, 07:58
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: incorrect subtraction in get color pixel value

That's normal computer science
It makes sense once you begin thinking of each data type as the bits it is capable of storing, rather than the everyday math you are accustom to.

Each data type has it's own unique data representation and we have to understand what each of them means and how it affects the values we are storing in it and how the data types affect any calculations or intermediate calculations that we may go through.

If you use a data type that can only hold 0-255, then what would you expect to happen when adding or subtracting leaves us with a number outside the possible range? If you look in the LabVIEW palettes you'll find a dozen different data types you can use. Understanding why you would use each of them is one of those skills we develop.

Integer (computer science): http://en.wikipedia.org/wiki/Integer_%28computer_science%29
Signed number representations: http://en.wikipedia.org/wiki/Signed_...epresentations
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-04-2012 at 08:04.
Reply With Quote