Week 9 Day 1 - Hex & Octal, Image Processing, NEON

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=g0PJaW4Wk24



Duration: 1:57:11
175 views
3


Today we talked about the usefulness of hex and how to convert to and from binary (as well as other formats), and a bit on octal. Hex digits are groups of four bits, and octal digits are groups of three bits. As such hex digits range from 0 to 15, i.e. 0 to "F"... A is 10, B is 11, C is 12, D is 13, E is 14, and F is 15. Octal digits range from 0 to 7.


You write a hex number like this 0xFFFF0000. (The 0x prefix means it is a hex digit, not decimal. It certainly doesn't mean multiply by 0!) 0xFFFF0000 means 16 1's followed by 16 0's in binary. A 32 bit number in hex is therefore only 8 digits, instead of 32. Makes dealing with binary numbers a lot easier.


An octal digit is written with a leading 0, like this: 052. 052 in octal means 42 in decimal. Why? Because the last digit is the 1s digit, so it contributes two points to the total. The 5 is in the 8's digits place, so it contributes 40. Therefore, 40+2 = 42.


We then talked about image processing. An image file (at least the way we're doing it) is a 3D array of unsigned chars, ranging from 0 to 255. The first plane holds all the red values, the second plane holds all the green values, the third plane holds all the blue values. Your job for this assignment is to halve all the values, the next one will be more complicated.


We then went over more examples of how to use NEON to do SIMD processing.







Tags:
csci 45
neon
simd
hex
octal
image processing