Necessary Fundamentals / Boolean Operations
Subtitles of the Movie
Binary number systems have only 2 digits but the operations on them are the same as if they had more. For example, in base 10 the number 15 shifted one position to the left with a zero introduced on the right multiplies the number by the base which is 10 and results in 150. In the same way, a binary value, this is 15 in boolean can be shifted one position to the left with a zero introduced on the right and that multiples the value by the base which is 2 and that doubles the number to 30, so shifting a binary number to the left, one position, is the same as multiplying it by 2 and shifting a binary value to the right one position is the same as dividing it by 2. Adding works the same as it always has but you've just got to remember that 1 plus 1 is equal to 10, also 1 plus 1 plus 1 equals 11. So look at this addition of 15 plus 10. First, add 1 plus 0 which gives 1, then 1 plus 1 is 11 so you put down the 1 and carry 1. Then the carried 1 plus 1 plus 0 is 10 so you put down the 0 and carry the 1. Finally, the carried 1 plus 1 is 11 and that's the result, 15 plus 10 is 25. Subtracting can be done the same way but there is an easier way, I'll have more about that in the next lesson. Binary numbers have some unique characteristics, they're used extensively in programming, especially in assembly language. First, a bit can be only one of two values, either 1 or 0. A computer program is full of yes or no questions and by tradition, we have assumed that 0 is false and 1 is true. This is done so much and used in so many ways that it has become universally accepted that 0 always means false and 1 always means true. If you wish, you can go ahead and talk about them that way, everybody does. You will never find a contradiction, the simplest of the boolean operators is unary not operation, it will reverse 1 to 0 or 0 to 1.
Tutorial Information
| Course: | Assembly Language Programming |
| Author: | Arthur Griffith |
| SKU: | 33995 |
| ISBN: | 1-935320-44-0 |
| Release Date: | 2009-05-28 |
| Duration: | 5.5 hrs / 70 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 81,350 Video Tutorials (20,800 free)
- Video Available as Flash or QuickTime
- Over 782 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 