Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6130133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:49:21+00:00 2026-05-23T16:49:21+00:00

How does mod of power of 2 work on only lower order bits of

  • 0
  1. How does mod of power of 2 work on only lower order bits of a binary number (1011000111011010)?
  2. What is this number mod 2 to power 0, 2 to power 4?
  3. What does power of 2 have to do with the modulo operator? Does it hold a special property?
  4. Can someone give me an example?

The instructor says “When you take something mod to power of 2 you just take its lower order bits”. I was too afraid to ask what he meant =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:49:22+00:00Added an answer on May 23, 2026 at 4:49 pm

    He meant that taking number mod 2^n is equivalent to stripping off all but the n lowest-order (right-most) bits of number.

    For example, if n == 2,

    number      number mod 4
    00000001      00000001
    00000010      00000010
    00000011      00000011
    00000100      00000000
    00000101      00000001
    00000110      00000010
    00000111      00000011
    00001000      00000000
    00001001      00000001
    etc.
    

    So in other words, number mod 4 is the same as number & 00000011 (where & means bitwise-and)


    Note that this works exactly the same in base-10: number mod 10 gives you the last digit of the number in base-10, number mod 100 gives you the last two digits, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does mod rewrite work together with hashtags? Maybe my code is crap, but this
Why this parameter does not pass: file.php?t=%26quot%3B%26gt%3B%0A%09%09%09%26lt Instead it gives: Forbidden You don't have
mod_pagespeed does this nifty image-resizing, but only if width= and height= attributes on the
Does anyone have an idea how can I fix this vulnerability in Apache 2.2.4
Does COUNT(*) have any significant impact for MySQL performance if query already has GROUP
Does anyone have a translate function for x/y positions after rotation in javascript? for
Does anyone know why UsernameExists wont return True. I must have my syntax messed
Does the G'MIC (Grey's Magic Image Converter) library work on iOS ? what steps
Does anybody know why this function, when passed an invalid date (e.g. timestamp) to
1- Does mod_rewrite means that if I make this url: domain.com/ad.php?id=8498292 INTO domain.com/8498292 that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.