data-representation

9-bit floating point representations using IEEE floating point format A and B

删除回忆录丶 提交于 2019-12-02 06:37:55
问题 I'm having some trouble with a problem I've run into dealing with floating points. I'm having a hard time moving from floating point representation to decimal values and also from format A of the representation to format B of the representation. The problem: Consider the following two 9-bit floating-point representations based on the IEEE floating-point format. Format A There is one sign bit. There are k = 5 exponent bits. The exponent bias is 15. There are n = 3 fraction bits. Format B There

What is the maximum and minimum values can be represented with 5-digit number? in 2's complement representation

白昼怎懂夜的黑 提交于 2019-12-01 08:57:21
问题 What is the maximum and minimum values can be represented with 5-digit number that is assuming 2's complement representation? do I find the the min and maximum value of 5-digit numbers, which are 00000 and I'm not sure what the max is. Then convert to two's complement? This sounds stupid, but it's the only one I can come up with... my last question is: What is the minimum register length in a processor required to store values between –EA(base16) and 24(base16) assuming they are stores using

Pygraphviz / networkx set node level or layer

谁都会走 提交于 2019-11-28 10:19:17
I have a dataset that represents a kind of genealogy tree. Each node has 2 parents (except first generation, they have no parents). For a given node, its parents can be from any previous generation. For example a node in generation n, can have a parent in n-1, and another parent in n-5. A node can be parent of several other nodes. So basically, for every node I know its generation and its parents. I am trying to represent this graph keeping the nodes from the same generation in the same line. Each generation has 10 nodes, except the first one. So far I am trying the "dot" layout. When I only

What do the C and C++ standards say about bit-level integer representation and manipulation?

☆樱花仙子☆ 提交于 2019-11-27 14:21:45
I know the C and C++ standards don't dictate a particular representation for numbers (could be two's complement, sign-and-magnitude, etc.). But I don't know the standards well enough (and couldn't find if it's stated) to know if there are any particular restrictions/guarantees/reserved representations made when working with bits. Particularly: If all the bits in an integer type are zero, does the integer as whole represent zero? If any bit in an integer type is one, does the integer as a whole represent non-zero? (if this is a "yes" then some representations like sign-and-magnitude would be

What do the C and C++ standards say about bit-level integer representation and manipulation?

ぐ巨炮叔叔 提交于 2019-11-26 16:42:10
问题 I know the C and C++ standards don't dictate a particular representation for numbers (could be two's complement, sign-and-magnitude, etc.). But I don't know the standards well enough (and couldn't find if it's stated) to know if there are any particular restrictions/guarantees/reserved representations made when working with bits. Particularly: If all the bits in an integer type are zero, does the integer as whole represent zero? If any bit in an integer type is one, does the integer as a

What is “2's Complement”?

≯℡__Kan透↙ 提交于 2019-11-25 21:43:13
问题 I\'m in a computer systems course and have been struggling , in part, with Two\'s Complement. I want to understand it but everything I\'ve read hasn\'t brought the picture together for me. I\'ve read the wikipedia article and various other articles, including my text book. Hence, I wanted to start this community wiki post to define what Two\'s Complement is, how to use it and how it can affect numbers during operations like casts (from signed to unsigned and vice versa), bit-wise operations