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

    Bit level equivalence of unsigned and two-s complement multiplication

    Dec 16, 20241 min read

    • Let x and y​ be bit vectors of length w
    • Define x and y as the values represented by these bits in two’s complement form
      • x=B2Tw​(x) and B2Tw​(y​)
    • Let x′ and y′ as the values represented by the bits x and y​ in unsigned form
      • x′=B2Uw​(x) and y′=B2U(y​)
    T2Bw​(x∗wt​y)=U2B(x′∗wu​y′)

    Demonstration

    Although the bit representations of full products may differ; the truncated results match

    Sources

    • Computer Systems - A Programmer’s Perspective

    Related Notes

    • Multiplying signed integers
    • Multiplying unsigned integers

    Graph View

    • Demonstration
    • Sources
    • Related Notes

    Backlinks

    • Operations on signed and unsigned integers

    Created with Quartz v4.4.0 © 2024

    • GitHub
    • Discord Community