This project has been inspired by week 4 lecture (Memory) of CS50's Introduction to Computer Science course. The idea came from the slides David Malan presented in the lecture explaining how memory allocation works.
Although this is a simple simulation of memory’s actual mechanism, the binary representations of data types are realistic.
But there are more than one memory architectures which based on bytes could be stored in memory, usually referred as Endianness. On this project I chose Big-Endian architecture.
To convert data types to binary representation different mathematical operations are being used. Especially in case of negative numbers the process of this conversion is not as straight forward as one would imagine. For example, check out One's complement and Two's Complement algorithms which are being used to convert negative integers to binary. These 2 articles explain how integers and floats convert to binary in details. explain how this operations work.