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 1062923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:42:19+00:00 2026-05-16T18:42:19+00:00

I found some exercises where you combine n-bit 2’s complement values in different ways

  • 0

I found some exercises where you combine n-bit 2’s complement values in different ways and simplify the output where possible. (Their practice exercises use 16-bit, but that’s irrelevant).

Eg:

!(!x&!y) == x|y

0 & y, negate the output == -1

I’m having no problem applying De Morgan’s laws with the examples using AND, OR, and NOT but I am having difficulty using NOT with + and –

Eg:

!(!x+y) == x-y

!(y-1) == -y

How does NOT distribute?

Edit: responding to comments: I realize this is a bitwise NOT. My question is: in algebraic terms, how does it distribute as per algebra? Example on Wikipedia

  • 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-16T18:42:20+00:00Added an answer on May 16, 2026 at 6:42 pm

    With 2’s complement numbers when you bitwise NOT them it is the same as saying the negative of the number minus 1, so !x is equivalent to -x - 1 where x can be a single variable or an expression.

    Starting with !(!x+y), well !x is going to be -x - 1 so then it is !(-x - 1 + y) which becomes -(-x - 1 + y) - 1 which simplifies to x - y.

    And for !(y-1), that becomes -(y - 1) - 1 = -y + 1 - 1 = -y.

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

Sidebar

Related Questions

I am doing some exercises in assembly language and I found a question about
I've seen some great in-browser tutorials and/or practice exercises in other languages. To name
I'm new to Struts 2, and I've done some exercises, but I haven't found
I found some lovely websites - http://www.mini.jp/event_campaign/big-point/ , http://www.twenty8twelve.com/ and http://www.scozzese.com - all vertical
I found some problems when implementing Jake Wharton 's ViewPagerIndicator . These are what
I found some things I want to submit a pull request for in the
I found some classes designed for debugging in package com.sun.jdi like VirtualMachine , but
I found some old Python code that was doing something like: if type(var) is
I found some really great code from Matt Gallagher for use with making Undo
I found some old code which I'm not sure I understand completely. The folowing

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.