What's the difference between (size_t)-1 and ~0?What is the purpose of “int mask = ~0;”?Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?What is the difference between -1 and ~0What is the difference between #include <filename> and #include “filename”?Signed versus Unsigned IntegersWhy doesn't C have unsigned floats?What is the difference between const int*, const int * const, and int const *?size_t vs. uintptr_tDifference between malloc and calloc?Improve INSERT-per-second performance of SQLite?Difference between signed / unsigned charshould use size_t or ssize_tWhy is unsigned integer overflow defined behavior but signed integer overflow isn't?

Who is "He that flies" in Lord of the Rings?

Why are MBA programs closing in the United States?

Adjusting in-line xy-pic diagrams to the baseline

Why isn't Bash trap working if output is redirected to stdout?

Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?

The significance of kelvin as a unit of absolute temperature

Comparing arithmetic complexity of FFT radix-2 and convolution

Diatonic chords of a pentatonic vs blues scale?

Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?

Can there be absolute velocity?

Transfer custom ringtones to iPhone using a computer running Linux

Do you have to have figures when playing D&D?

Confused with atmospheric pressure equals plastic balloon’s inner pressure

Why is Na5 not played in this line of the French Defense, Advance Variation?

Why Does Mama Coco Look Old After Going to the Other World?

Why do radiation hardened IC packages often have long leads?

Extracting data from Plot

Find the Missing Members of this Powered Sequence

Is using 'echo' to display attacker-controlled data on the terminal dangerous?

Latex - unable to get proper boxes

Use 1 9 6 2 in this order to make 75

Was planting UN flag on Moon ever discussed?

Analogy between an unknown in an argument, and a contradiction in the principle of explosion

Calculating the area of a parallelogram



What's the difference between (size_t)-1 and ~0?


What is the purpose of “int mask = ~0;”?Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?What is the difference between -1 and ~0What is the difference between #include <filename> and #include “filename”?Signed versus Unsigned IntegersWhy doesn't C have unsigned floats?What is the difference between const int*, const int * const, and int const *?size_t vs. uintptr_tDifference between malloc and calloc?Improve INSERT-per-second performance of SQLite?Difference between signed / unsigned charshould use size_t or ssize_tWhy is unsigned integer overflow defined behavior but signed integer overflow isn't?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








6















I've seen both (size_t)-1 and ~0 used to represent large numbers, or numbers with all their bits flipped.



Is there any difference between the two? If so, what is it?



I found this question: What is the difference between -1 and ~0, however it did not answer my question because I'm dealing with unsigned integers (such as size_t), as opposed to signed integers (such as int).










share|improve this question

















  • 1





    Note that ~0 is a signed quantity — you'd need ~0U to make it unsigned.

    – Jonathan Leffler
    Apr 14 at 18:56











  • Should I edit that?

    – JL2210
    Apr 14 at 18:58






  • 3





    Since you've got some answers which addresses ~0 rather than ~0U, best to leave it unchanged, I think, but note for the future that it is a good idea to be careful. You can change a question up until making the change would invalidate answers.

    – Jonathan Leffler
    Apr 14 at 19:05












  • related: Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?, What is the purpose of "int mask = ~0;"?

    – phuclv
    Apr 15 at 1:47











  • Differences: First is C++. Second is not unsigned.

    – JL2210
    Apr 15 at 11:03

















6















I've seen both (size_t)-1 and ~0 used to represent large numbers, or numbers with all their bits flipped.



Is there any difference between the two? If so, what is it?



I found this question: What is the difference between -1 and ~0, however it did not answer my question because I'm dealing with unsigned integers (such as size_t), as opposed to signed integers (such as int).










share|improve this question

















  • 1





    Note that ~0 is a signed quantity — you'd need ~0U to make it unsigned.

    – Jonathan Leffler
    Apr 14 at 18:56











  • Should I edit that?

    – JL2210
    Apr 14 at 18:58






  • 3





    Since you've got some answers which addresses ~0 rather than ~0U, best to leave it unchanged, I think, but note for the future that it is a good idea to be careful. You can change a question up until making the change would invalidate answers.

    – Jonathan Leffler
    Apr 14 at 19:05












  • related: Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?, What is the purpose of "int mask = ~0;"?

    – phuclv
    Apr 15 at 1:47











  • Differences: First is C++. Second is not unsigned.

    – JL2210
    Apr 15 at 11:03













6












6








6








I've seen both (size_t)-1 and ~0 used to represent large numbers, or numbers with all their bits flipped.



Is there any difference between the two? If so, what is it?



I found this question: What is the difference between -1 and ~0, however it did not answer my question because I'm dealing with unsigned integers (such as size_t), as opposed to signed integers (such as int).










share|improve this question














I've seen both (size_t)-1 and ~0 used to represent large numbers, or numbers with all their bits flipped.



Is there any difference between the two? If so, what is it?



I found this question: What is the difference between -1 and ~0, however it did not answer my question because I'm dealing with unsigned integers (such as size_t), as opposed to signed integers (such as int).







c unsigned ones-complement






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 14 at 18:50









JL2210JL2210

1,439726




1,439726







  • 1





    Note that ~0 is a signed quantity — you'd need ~0U to make it unsigned.

    – Jonathan Leffler
    Apr 14 at 18:56











  • Should I edit that?

    – JL2210
    Apr 14 at 18:58






  • 3





    Since you've got some answers which addresses ~0 rather than ~0U, best to leave it unchanged, I think, but note for the future that it is a good idea to be careful. You can change a question up until making the change would invalidate answers.

    – Jonathan Leffler
    Apr 14 at 19:05












  • related: Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?, What is the purpose of "int mask = ~0;"?

    – phuclv
    Apr 15 at 1:47











  • Differences: First is C++. Second is not unsigned.

    – JL2210
    Apr 15 at 11:03












  • 1





    Note that ~0 is a signed quantity — you'd need ~0U to make it unsigned.

    – Jonathan Leffler
    Apr 14 at 18:56











  • Should I edit that?

    – JL2210
    Apr 14 at 18:58






  • 3





    Since you've got some answers which addresses ~0 rather than ~0U, best to leave it unchanged, I think, but note for the future that it is a good idea to be careful. You can change a question up until making the change would invalidate answers.

    – Jonathan Leffler
    Apr 14 at 19:05












  • related: Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?, What is the purpose of "int mask = ~0;"?

    – phuclv
    Apr 15 at 1:47











  • Differences: First is C++. Second is not unsigned.

    – JL2210
    Apr 15 at 11:03







1




1





Note that ~0 is a signed quantity — you'd need ~0U to make it unsigned.

– Jonathan Leffler
Apr 14 at 18:56





Note that ~0 is a signed quantity — you'd need ~0U to make it unsigned.

– Jonathan Leffler
Apr 14 at 18:56













Should I edit that?

– JL2210
Apr 14 at 18:58





Should I edit that?

– JL2210
Apr 14 at 18:58




3




3





Since you've got some answers which addresses ~0 rather than ~0U, best to leave it unchanged, I think, but note for the future that it is a good idea to be careful. You can change a question up until making the change would invalidate answers.

– Jonathan Leffler
Apr 14 at 19:05






Since you've got some answers which addresses ~0 rather than ~0U, best to leave it unchanged, I think, but note for the future that it is a good idea to be careful. You can change a question up until making the change would invalidate answers.

– Jonathan Leffler
Apr 14 at 19:05














related: Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?, What is the purpose of "int mask = ~0;"?

– phuclv
Apr 15 at 1:47





related: Is static_cast<T>(-1) the right way to generate all-one-bits data without numeric_limits?, What is the purpose of "int mask = ~0;"?

– phuclv
Apr 15 at 1:47













Differences: First is C++. Second is not unsigned.

– JL2210
Apr 15 at 11:03





Differences: First is C++. Second is not unsigned.

– JL2210
Apr 15 at 11:03












3 Answers
3






active

oldest

votes


















6















What's the difference between (size_t)-1 and ~0?




Type and value differ.



(size_t)-1 is the same value as SIZE_MAX and has a type of size_t.



~0 is often -1 and has the type of int.




Assigning both of those to a size_t will result in SIZE_MAX.



size_t a = (size_t)-1; 
size_t b = ~0;


In the 2nd case, -1 is assigned to a b and undergoes a conversion first, wrapping around the -1 to the maximum size_t value.






share|improve this answer

























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Bhargav Rao
    Apr 14 at 19:51


















3














(size_t)-1 is of type size_t. It typically has a value of 232-1 or 264-1 (4294967295 or 18446744073709551615).



~0 is of type int, and has the value -1 on a 2's-complement system (i.e., just about everywhere).



Both are likely to have the same bit pattern -- if int and size_t are the same size, which they very commonly are not.



If you want the maximum value of type size_t, you can use the SIZE_MAX macro, defined in <stdint.h>. If you're using an older implementation (pre-C99) that doesn't provide SIZE_MAX, (size_t)-1 will work. I'm not sure why you'd want to write ~0 rather than -1 -- unless perhaps you're considering non-two's-complement systems.






share|improve this answer

























  • Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

    – JL2210
    Apr 14 at 19:02











  • Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

    – TLW
    Apr 14 at 21:43


















2














Note that the previous answers assume a 2's complement machine (very likely to be the case these days, but not guaranteed).



If you had a sign-magnitude machine then -1 would have a sign bit and least significant bit set with all others clear, if you had a 1's complement machine then -1 would have all bits but the LSB set.



In all of these cases (including the common 2's complement machine), ~0 has all bits set.






share|improve this answer

























  • Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

    – JL2210
    Apr 14 at 20:56







  • 2





    @JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

    – TLW
    Apr 14 at 21:41











  • Ah. I understand now. I'll upvote as soon as this is edited.

    – JL2210
    Apr 14 at 22:02











  • Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

    – chux
    Apr 15 at 0:54











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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55678835%2fwhats-the-difference-between-size-t-1-and-0%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









6















What's the difference between (size_t)-1 and ~0?




Type and value differ.



(size_t)-1 is the same value as SIZE_MAX and has a type of size_t.



~0 is often -1 and has the type of int.




Assigning both of those to a size_t will result in SIZE_MAX.



size_t a = (size_t)-1; 
size_t b = ~0;


In the 2nd case, -1 is assigned to a b and undergoes a conversion first, wrapping around the -1 to the maximum size_t value.






share|improve this answer

























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Bhargav Rao
    Apr 14 at 19:51















6















What's the difference between (size_t)-1 and ~0?




Type and value differ.



(size_t)-1 is the same value as SIZE_MAX and has a type of size_t.



~0 is often -1 and has the type of int.




Assigning both of those to a size_t will result in SIZE_MAX.



size_t a = (size_t)-1; 
size_t b = ~0;


In the 2nd case, -1 is assigned to a b and undergoes a conversion first, wrapping around the -1 to the maximum size_t value.






share|improve this answer

























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Bhargav Rao
    Apr 14 at 19:51













6












6








6








What's the difference between (size_t)-1 and ~0?




Type and value differ.



(size_t)-1 is the same value as SIZE_MAX and has a type of size_t.



~0 is often -1 and has the type of int.




Assigning both of those to a size_t will result in SIZE_MAX.



size_t a = (size_t)-1; 
size_t b = ~0;


In the 2nd case, -1 is assigned to a b and undergoes a conversion first, wrapping around the -1 to the maximum size_t value.






share|improve this answer
















What's the difference between (size_t)-1 and ~0?




Type and value differ.



(size_t)-1 is the same value as SIZE_MAX and has a type of size_t.



~0 is often -1 and has the type of int.




Assigning both of those to a size_t will result in SIZE_MAX.



size_t a = (size_t)-1; 
size_t b = ~0;


In the 2nd case, -1 is assigned to a b and undergoes a conversion first, wrapping around the -1 to the maximum size_t value.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 14 at 19:10

























answered Apr 14 at 18:56









chuxchux

86.5k875160




86.5k875160












  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Bhargav Rao
    Apr 14 at 19:51

















  • Comments are not for extended discussion; this conversation has been moved to chat.

    – Bhargav Rao
    Apr 14 at 19:51
















Comments are not for extended discussion; this conversation has been moved to chat.

– Bhargav Rao
Apr 14 at 19:51





Comments are not for extended discussion; this conversation has been moved to chat.

– Bhargav Rao
Apr 14 at 19:51













3














(size_t)-1 is of type size_t. It typically has a value of 232-1 or 264-1 (4294967295 or 18446744073709551615).



~0 is of type int, and has the value -1 on a 2's-complement system (i.e., just about everywhere).



Both are likely to have the same bit pattern -- if int and size_t are the same size, which they very commonly are not.



If you want the maximum value of type size_t, you can use the SIZE_MAX macro, defined in <stdint.h>. If you're using an older implementation (pre-C99) that doesn't provide SIZE_MAX, (size_t)-1 will work. I'm not sure why you'd want to write ~0 rather than -1 -- unless perhaps you're considering non-two's-complement systems.






share|improve this answer

























  • Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

    – JL2210
    Apr 14 at 19:02











  • Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

    – TLW
    Apr 14 at 21:43















3














(size_t)-1 is of type size_t. It typically has a value of 232-1 or 264-1 (4294967295 or 18446744073709551615).



~0 is of type int, and has the value -1 on a 2's-complement system (i.e., just about everywhere).



Both are likely to have the same bit pattern -- if int and size_t are the same size, which they very commonly are not.



If you want the maximum value of type size_t, you can use the SIZE_MAX macro, defined in <stdint.h>. If you're using an older implementation (pre-C99) that doesn't provide SIZE_MAX, (size_t)-1 will work. I'm not sure why you'd want to write ~0 rather than -1 -- unless perhaps you're considering non-two's-complement systems.






share|improve this answer

























  • Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

    – JL2210
    Apr 14 at 19:02











  • Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

    – TLW
    Apr 14 at 21:43













3












3








3







(size_t)-1 is of type size_t. It typically has a value of 232-1 or 264-1 (4294967295 or 18446744073709551615).



~0 is of type int, and has the value -1 on a 2's-complement system (i.e., just about everywhere).



Both are likely to have the same bit pattern -- if int and size_t are the same size, which they very commonly are not.



If you want the maximum value of type size_t, you can use the SIZE_MAX macro, defined in <stdint.h>. If you're using an older implementation (pre-C99) that doesn't provide SIZE_MAX, (size_t)-1 will work. I'm not sure why you'd want to write ~0 rather than -1 -- unless perhaps you're considering non-two's-complement systems.






share|improve this answer















(size_t)-1 is of type size_t. It typically has a value of 232-1 or 264-1 (4294967295 or 18446744073709551615).



~0 is of type int, and has the value -1 on a 2's-complement system (i.e., just about everywhere).



Both are likely to have the same bit pattern -- if int and size_t are the same size, which they very commonly are not.



If you want the maximum value of type size_t, you can use the SIZE_MAX macro, defined in <stdint.h>. If you're using an older implementation (pre-C99) that doesn't provide SIZE_MAX, (size_t)-1 will work. I'm not sure why you'd want to write ~0 rather than -1 -- unless perhaps you're considering non-two's-complement systems.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 14 at 19:01









Jonathan Leffler

582k966961052




582k966961052










answered Apr 14 at 19:00









Keith ThompsonKeith Thompson

197k27292490




197k27292490












  • Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

    – JL2210
    Apr 14 at 19:02











  • Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

    – TLW
    Apr 14 at 21:43

















  • Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

    – JL2210
    Apr 14 at 19:02











  • Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

    – TLW
    Apr 14 at 21:43
















Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

– JL2210
Apr 14 at 19:02





Thanks for letting me know. I'll remember to define SIZE_MAX in my stdint.h implementation.

– JL2210
Apr 14 at 19:02













Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

– TLW
Apr 14 at 21:43





Re; ~0 versus -1 - some compilers warn on implicit wrapping in constant expressions.

– TLW
Apr 14 at 21:43











2














Note that the previous answers assume a 2's complement machine (very likely to be the case these days, but not guaranteed).



If you had a sign-magnitude machine then -1 would have a sign bit and least significant bit set with all others clear, if you had a 1's complement machine then -1 would have all bits but the LSB set.



In all of these cases (including the common 2's complement machine), ~0 has all bits set.






share|improve this answer

























  • Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

    – JL2210
    Apr 14 at 20:56







  • 2





    @JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

    – TLW
    Apr 14 at 21:41











  • Ah. I understand now. I'll upvote as soon as this is edited.

    – JL2210
    Apr 14 at 22:02











  • Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

    – chux
    Apr 15 at 0:54















2














Note that the previous answers assume a 2's complement machine (very likely to be the case these days, but not guaranteed).



If you had a sign-magnitude machine then -1 would have a sign bit and least significant bit set with all others clear, if you had a 1's complement machine then -1 would have all bits but the LSB set.



In all of these cases (including the common 2's complement machine), ~0 has all bits set.






share|improve this answer

























  • Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

    – JL2210
    Apr 14 at 20:56







  • 2





    @JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

    – TLW
    Apr 14 at 21:41











  • Ah. I understand now. I'll upvote as soon as this is edited.

    – JL2210
    Apr 14 at 22:02











  • Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

    – chux
    Apr 15 at 0:54













2












2








2







Note that the previous answers assume a 2's complement machine (very likely to be the case these days, but not guaranteed).



If you had a sign-magnitude machine then -1 would have a sign bit and least significant bit set with all others clear, if you had a 1's complement machine then -1 would have all bits but the LSB set.



In all of these cases (including the common 2's complement machine), ~0 has all bits set.






share|improve this answer















Note that the previous answers assume a 2's complement machine (very likely to be the case these days, but not guaranteed).



If you had a sign-magnitude machine then -1 would have a sign bit and least significant bit set with all others clear, if you had a 1's complement machine then -1 would have all bits but the LSB set.



In all of these cases (including the common 2's complement machine), ~0 has all bits set.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 15 at 0:22









JL2210

1,439726




1,439726










answered Apr 14 at 20:39









SoronelHaetirSoronelHaetir

7,4911514




7,4911514












  • Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

    – JL2210
    Apr 14 at 20:56







  • 2





    @JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

    – TLW
    Apr 14 at 21:41











  • Ah. I understand now. I'll upvote as soon as this is edited.

    – JL2210
    Apr 14 at 22:02











  • Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

    – chux
    Apr 15 at 0:54

















  • Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

    – JL2210
    Apr 14 at 20:56







  • 2





    @JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

    – TLW
    Apr 14 at 21:41











  • Ah. I understand now. I'll upvote as soon as this is edited.

    – JL2210
    Apr 14 at 22:02











  • Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

    – chux
    Apr 15 at 0:54
















Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

– JL2210
Apr 14 at 20:56






Note that in the question I'm asking about unsigned integers, so there's no such thing as a "sign bit".

– JL2210
Apr 14 at 20:56





2




2





@JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

– TLW
Apr 14 at 21:41





@JL2210 - note that the intermediate values of both ~0 and -1 are signed, not unsigned.

– TLW
Apr 14 at 21:41













Ah. I understand now. I'll upvote as soon as this is edited.

– JL2210
Apr 14 at 22:02





Ah. I understand now. I'll upvote as soon as this is edited.

– JL2210
Apr 14 at 22:02













Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

– chux
Apr 15 at 0:54





Concerning non-2s-complement: The most recent non-2's complement machine I have heard of was from somewhere in 2000-2008 and I have not used one since pre-1990. Do you know of any in use in the last 10 years?

– chux
Apr 15 at 0:54

















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55678835%2fwhats-the-difference-between-size-t-1-and-0%23new-answer', 'question_page');

);

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







Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?