More Lies we tell in Computing Higher!

24233_fly_poster_graffiti_trust_the_liesLie #4 Unicode is a 16-bit code system used to represent characters.

Er. No it isn’t. Now this one did come from an exam question in the dawn of time!  Unicode is implemented using different characters codings. There are actually either 8-bit (utf-8), 16-bit (utf-16) or 32-bit (yep, utf-32) versions.

We say that Unicode represents a maximum of 65536 characters (being 16-bits notionally) but no the current standard of Unicode represents 110,182 characters from over 100 script based languages.  In fact, Unicode has 1,114,112 code points of variable lengths (some 8 bits some 24-bits, some 16-bits) and uses these to represent things like Egyptian Hieroglyphics or Ancient Chinese characters.

Lie #5 IP address ranges

Frequently in the Computer Networking unit learners are asked to state how many IP addresses will be available for a particular Class of network. IP4 addresses are 4 bytes or octets long.  With a class A address the first byte of the network address, the rest the host address – with class B it’s the first two bytes for the network and for class C its the first 3 bytes. So far, so good!

Question: Calculate the maximum number of computers which can be connected to this class C network (192.168.0.0). Answer given…255.  This assumes that 1 IP address is reserved for the network and that the rest are available for computers…NO NO NO!

The address of the network is 192.168.0.0 (this will be the router or device which controls network traffic).  The network has a broadcast address where messages can be sent to the whole network – the broadcast address would be 192.168.0.255 – so this means that only 254 addresses would be available for computers.

Lie #6 Compilers turn source code into executable machine code

This one is a little over simplistic.  We say to our learners that compilers and interpreters both translate programme source code into machine code. Compiler does it all at once to make a machine code file and the interpreter does it line by line, executing the machine code as it goes.

It is far more likely that the compiler will actually produce what is called object code and then a linker will bring together the various parts of the project into one whole program. For example in Windows a linker might bring together several objects and libraries (obj and lib files) into one executable (exe) or one dynamic link library (dll).  In most cases the compiler doesn’t produce executable machine code, the linker is needed to do this.

…more Lies to come :/

Share
%d bloggers like this: