It appears the layout of the sensors allows the user to insert the bill upside down. In the code, you just compare the sensors in reverse.
Also, the 45 degree sensor is reading the surface of the bill compared to reading through the bill for the outside sensors. I'm sure that was assumed, but I didn't hear it on the video.
![Smiley :)](https://www.eevblog.com/forum/Smileys/default/smiley.gif)
I wouldn't be surprised if it doesn't actually read the signal for the entire bill as it goes by each sensor. They could then teach it new bills at the factory by basically:
1) Tell it "here comes a good $1"
2) It scans the entire length (or some decent fraction of it)
3) Remembers what it saw.
Then when it is in the field, after reading a bill, it compares what it saw to what it wanted to see:
62% match to a $1 bill (right side up)
89% match to a $5 bill (right side up)
71% match to a $10 bill (right side up)
42% match to a $1 bill (upside down)
30% match to a $5 bill (upside down)
28% match to a $10 bill (upside down)
Must be a $5 bill.
![Smiley :)](https://www.eevblog.com/forum/Smileys/default/smiley.gif)
16% match to a $1 bill (right side up)
24% match to a $5 bill (right side up)
36% match to a $10 bill (right side up)
etc
Must be Canadian bill, reject it.