Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #401204
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Representing signed values in corresponding unsigned types |
| Date | 2026-08-15 02:19 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <86fr0f68rr.fsf@linuxsc.com> (permalink) |
| References | <111qs0g$3hdko$1@dont-email.me> <86zf0e7ox4.fsf@linuxsc.com> <111shlo$3vq40$2@kst.eternal-september.org> |
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: > Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > >> NS <ns@2b.here> writes: >> >>> Can all the values of a signed int be represented in an unsigned >>> int (or signed long in an unsigned long, etc.)? > > Obviously not. Negative values cannot be represented in unsigned > types. But I don't think that's what NS meant. The question is Can all the values of a signed int be represented in an unsigned int? The question is not can an unsigned int hold all the values of a signed int. An apple, an orange, and a banana can represent the integers 1, 2, and 3. All the values of a signed int can be represented in an unsigned int, as long as UINT_MAX is greater than INT_MAX.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Representing signed values in corresponding unsigned types NS <ns@2b.here> - 2026-06-28 10:11 +0000
Re: Representing signed values in corresponding unsigned types ram@zedat.fu-berlin.de (Stefan Ram) - 2026-06-28 12:07 +0000
Re: Representing signed values in corresponding unsigned types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-06-28 06:52 -0700
Re: Representing signed values in corresponding unsigned types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-28 18:27 -0700
Re: Representing signed values in corresponding unsigned types cross@spitfire.i.gajendra.net (Dan Cross) - 2026-06-29 12:13 +0000
Re: Representing signed values in corresponding unsigned types Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-08-15 02:19 -0700
Re: Representing signed values in corresponding unsigned types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-08-15 05:48 -0700
Re: Representing signed values in corresponding unsigned types James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-06-28 22:23 -0400
Re: Representing signed values in corresponding unsigned types Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-06-28 20:24 -0700
csiph-web