signed
Sign extending from a constant bit width in C#
I have a value thats 5 bits in length. 4 bits determine the number and the 5th bit determines the sign, there by holding any value between -16 and +15. How can I accomplish sign extending from a const[详细]
2023-01-20 20:56 分类:问答Detecting signed overflow in C/C++
At first glance, this question may seem like a duplicate of How to detect integer overflow?, however it is actually significantly different.[详细]
2023-01-20 07:43 分类:问答double precision integer subtraction with 32-bit registers(MIPS)
I am learning computer arithmetic. The book I use(Patterson and Hennessey) lists the below question. Write mips code to conduct double[详细]
2023-01-20 06:03 分类:问答Little-Endian Signed Integer
I know the WAV file format uses signed integers for 16-bit samples. It also stores them in little-endian order, meaning the lowest 8 bits come first, then the next, etc. Is the special sign bit on the[详细]
2023-01-19 19:46 分类:问答convert string into signed int
I want to convert a string into a signed int. Following is the requirement. I have stored hex value as a string in buffer. Now I want to convert that value into signed int.[详细]
2023-01-18 01:27 分类:问答signed RSL without Flex (pure AS3 project)
Here there\'s a brief explanation of how we can \"simulate\" the RSL system used in Flex with pure AS3:[详细]
2023-01-17 09:10 分类:问答Any compiler which takes 'char' as 'unsigned' ?
Is there any C compiler which takes the default type of char as unsigned unless explicitly mentioned b开发者_开发问答y the user in the file or project settings?[详细]
2023-01-16 05:19 分类:问答Unsigned and Signed Values in C (Output)
signed int x = -5; unsigned int y = x; 开发者_如何学编程 What is the value of y? How is this so?It depends on the maximum value of the unsigned int. Typically, a unsigned int is 32-bit long, so the U[详细]
2023-01-15 12:58 分类:问答Would it break the language or existing code if we'd add safe signed/unsigned compares to C/C++?
After reading this question on signed/unsigned compares (they come up every couple of days I\'d say):[详细]
2023-01-11 05:07 分类:问答Arithmetic Overflow
Why is it that an arithmetic overflow cannot occur wh开发者_如何学Goen adding an positive and a negative number using two\'s complement. If you could please provide an example with 8-bit signed intege[详细]
2023-01-10 11:07 分类:问答