Adding 0X80 + 0X80Imply bit with constant 1 or 0 in SQL Serverhow many color combinations in a 24 bit imageHow to get the value of a bit at a certain position from a byte?Compiling C++11 with g++C Programming - Bitwise operators and knowing when to utilizeBitwise Logic in CHex transparency in colorsPrecisely when are ARM's condition flags cleared/modified?i8086 assembly: CF vs OF and SFbinary check for an operation
Will TSA allow me to carry a Continuous Positive Airway Pressure (CPAP) device?
Computing the differentials in the Adams spectral sequence
Is it possible to kill all life on Earth?
What is the right way to float a home lab?
Does Peach's float negate shorthop knockback multipliers?
What's the correct term for a waitress in the Middle Ages?
Why does a helium balloon rise?
How is it possible for this NPC to be alive during the Curse of Strahd adventure?
Is there a rule that prohibits us from using 2 possessives in a row?
If a problem only occurs randomly once in every N times on average, how many tests do I have to perform to be certain that it's now fixed?
What happens if you do emergency landing on a US base in middle of the ocean?
What people are called boars ("кабан") and why?
Short story written from alien perspective with this line: "It's too bright to look at, so they don't"
How to decline physical affection from a child whose parents are pressuring them?
Show sparse matrices like chessboards
Word for a small burst of laughter that can't be held back
The term for the person/group a political party aligns themselves with to appear concerned about the general public
Why was it possible to cause an Apple //e to shut down with SHIFT and paddle button 2?
Anyone teach web development? How do you assess it?
Does any lore text explain why the planes of Acheron, Gehenna, and Carceri are the alignment they are?
Unconventional Opposites
How to provide realism without making readers think grimdark
How to apply the "glow" effect to a rectangle with tcolorbox?
Please help me identify this plane
Adding 0X80 + 0X80
Imply bit with constant 1 or 0 in SQL Serverhow many color combinations in a 24 bit imageHow to get the value of a bit at a certain position from a byte?Compiling C++11 with g++C Programming - Bitwise operators and knowing when to utilizeBitwise Logic in CHex transparency in colorsPrecisely when are ARM's condition flags cleared/modified?i8086 assembly: CF vs OF and SFbinary check for an operation
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
As a preparation for my exam in Microcontrollers, I have this question:
How are the condition bits set when the Byte operation 0x80 + 0x80 is executed?
I understand how to add those 2, but I get 256 and I don't know which condition bits are set in this case.
hex conditional-statements bit flags
add a comment |
As a preparation for my exam in Microcontrollers, I have this question:
How are the condition bits set when the Byte operation 0x80 + 0x80 is executed?
I understand how to add those 2, but I get 256 and I don't know which condition bits are set in this case.
hex conditional-statements bit flags
add a comment |
As a preparation for my exam in Microcontrollers, I have this question:
How are the condition bits set when the Byte operation 0x80 + 0x80 is executed?
I understand how to add those 2, but I get 256 and I don't know which condition bits are set in this case.
hex conditional-statements bit flags
As a preparation for my exam in Microcontrollers, I have this question:
How are the condition bits set when the Byte operation 0x80 + 0x80 is executed?
I understand how to add those 2, but I get 256 and I don't know which condition bits are set in this case.
hex conditional-statements bit flags
hex conditional-statements bit flags
asked Mar 24 at 12:33
Alina KrichevskyAlina Krichevsky
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
First, the highest value one byte can hold is 255 (0xFF)
, so I do not think the result would be 256, but rather, overflow would cause the resulting value to be 0 (0x00)
.
Secondly, the condition bits would depend on your processor, but going by some ARM notes, I might reasonably expect:
Z: Zero
The Z flag is set if the result of the flag-setting instruction is zero.
C: Carry (or Unsigned Overflow)
The C flag is set if the result of an unsigned operation overflows the 32-bit result register. This bit can be used to implement 64-bit unsigned arithmetic, for example.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323837%2fadding-0x80-0x80%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First, the highest value one byte can hold is 255 (0xFF)
, so I do not think the result would be 256, but rather, overflow would cause the resulting value to be 0 (0x00)
.
Secondly, the condition bits would depend on your processor, but going by some ARM notes, I might reasonably expect:
Z: Zero
The Z flag is set if the result of the flag-setting instruction is zero.
C: Carry (or Unsigned Overflow)
The C flag is set if the result of an unsigned operation overflows the 32-bit result register. This bit can be used to implement 64-bit unsigned arithmetic, for example.
add a comment |
First, the highest value one byte can hold is 255 (0xFF)
, so I do not think the result would be 256, but rather, overflow would cause the resulting value to be 0 (0x00)
.
Secondly, the condition bits would depend on your processor, but going by some ARM notes, I might reasonably expect:
Z: Zero
The Z flag is set if the result of the flag-setting instruction is zero.
C: Carry (or Unsigned Overflow)
The C flag is set if the result of an unsigned operation overflows the 32-bit result register. This bit can be used to implement 64-bit unsigned arithmetic, for example.
add a comment |
First, the highest value one byte can hold is 255 (0xFF)
, so I do not think the result would be 256, but rather, overflow would cause the resulting value to be 0 (0x00)
.
Secondly, the condition bits would depend on your processor, but going by some ARM notes, I might reasonably expect:
Z: Zero
The Z flag is set if the result of the flag-setting instruction is zero.
C: Carry (or Unsigned Overflow)
The C flag is set if the result of an unsigned operation overflows the 32-bit result register. This bit can be used to implement 64-bit unsigned arithmetic, for example.
First, the highest value one byte can hold is 255 (0xFF)
, so I do not think the result would be 256, but rather, overflow would cause the resulting value to be 0 (0x00)
.
Secondly, the condition bits would depend on your processor, but going by some ARM notes, I might reasonably expect:
Z: Zero
The Z flag is set if the result of the flag-setting instruction is zero.
C: Carry (or Unsigned Overflow)
The C flag is set if the result of an unsigned operation overflows the 32-bit result register. This bit can be used to implement 64-bit unsigned arithmetic, for example.
answered Mar 24 at 12:40
abelenkyabelenky
48.3k2184137
48.3k2184137
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55323837%2fadding-0x80-0x80%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown