Type something
Every letter becomes eight switches, and the switches become squares or stripes. Change a letter and the pattern changes completely.
These are drawings, not real codes. A true QR code and a true barcode follow strict rules so that scanners agree; this page only shows the idea, which is that a picture can be a row of switches.
The three heavy corners on a QR code are not data. They tell the scanner where the code is and which way up, so you can point a phone at it sideways and it still works.
The three modern signals
Radio sends to everybody in range at once, which is why the first thing anybody did with radio was invent better ciphers. A radio message cannot be aimed, cannot be recalled, and can be recorded by a stranger you will never know about.
Digital signals are on and off, millions of times a second: the same idea as morse, sped up past anything a human could follow. What changed is not the cleverness but the rate.
Machine-readable pictures take that stream and freeze it on paper, so a shop shelf or a museum wall can hold a message a phone can read but you cannot.
All three are built to be read by anyone with the right equipment, and none of them keeps a secret on its own. Every private thing you do online is a cipher riding on top of a signal that is entirely public.
Hexadecimal The ciphers