N-ary code is like having a secret code for numbers that we use every day. We usually count 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and start over again. N-ary code lets us use different symbols or letters to represent numbers.
For example, if we used the n-ary code of base 2, we would only use two symbols to count - 0 and 1. We can count using our normal numbers, but we would just use 1's and 0's to show them. So, 0 would be '0' and 1 would be '1'. If we wanted to count to 10 in binary (base 2), it would look like this: 0,1,10,11,100,101,110,111,1000,1001.
We can use different bases for n-ary code. For base 8, we would use the numbers 0-7, and for base 16, we would use the numbers 0-9 and the letters A-F.
N-ary code is really useful in computer programming because it saves space and makes it easier for machines to understand and process information. But, just like with any secret code, it takes some practice and understanding to use and read n-ary code.