Source: https://ee.sharif.edu/~asic/Tutorials/Fixed-Point.pdf