Ayush Poddar's Wiki

      • Business
      • Financial philosophies and lessons
      • Investments and Personal Finance
      • Taxation
      • Documentation on some tools
      • Events, anecdotes and facts
      • Life Philosophies
      • Politics, governance and legals
      • Productivity
      • Climate change
      • High level designs - Software Systems
      • Industrial production
      • Software engineering

    Truncating unsigned numbers

    Dec 16, 20241 min read

    • Assume that x′ is the result of truncating x
    • If x=B2Uw​(x) and x′=B2Uk​(x′), then x′=xmod2k.
      • This is equivalent to dropping the extra higher bits since the (k+1)th bit has the weight of 2k.

    Sources

    • Computer Systems - A Programmer’s Perspective

    Related Notes

    • Representing different data types in binary

    Graph View

    • Sources
    • Related Notes

    Backlinks

    • Operations on signed and unsigned integers

    Created with Quartz v4.4.0 © 2024

    • GitHub
    • Discord Community