Questions tagged [hexadecimal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Find hex values inside a string in C?

I have a long string "given_string", and I'm trying to find hex values within that string. Here's a simplified example: /* Find a sub-string in a given string: */ char * given_string = &...
0
votes
1answer
23 views

Hexadecimal to Decimal Conversion - Loop runs in reverse order (opposite to what is expected)!

The following code converts Hexadecimal numbers to Decimal numbers (successfully). I'm unable to figure out why the code behaves in just the opposite manner as it should be! I was planning to write: ...
0
votes
2answers
226 views

biHeight strange value pset4

when I run the peek on small.bmp or other the biHeight is fffffff4 I did printf on the height in the copy.c and it printed: 4294967284 What am I missing here?
0
votes
1answer
97 views

PS0, hexadecimal meaning

I don't understant the third question in PS0: How do you represent the (decimal) integer 50 in, oh, "hexadecimal," otherwise known as "base-16"? Know that decimal is considered "base-10" (since it ...
0
votes
1answer
90 views

pset4, recover. size of hexadecimal 1 bit?

I don't understand something. In recover, to store the card data, I've used a buffer which is an array of 512 BYTES(i.e. uint8_t). In (almost) every element of the array is stored an hexadecimal ...
0
votes
1answer
2k views

Conversion of hexadecimal to floating point

Does anybody know any way of conversion of hexadecimal to floating point? Any C, Java, C++ or any language's program that could automatically convert it or the formula to convert it manually on page ...
0
votes
1answer
77 views

Problem set 0 hexadecimal

How can I learn about hexadecimal for answering the question on problem set 0 ? Are there any shorts? Are there any websites?
1
vote
1answer
99 views

Converting an int to a hex string

In pset4 I want to create randomly colored bricks. To that end I created a function that returns a hex string. When I run it I get a segfault. Using gdb I have narrowed down the issue to the below ...
0
votes
2answers
176 views

Why Do We Add a char (A Byte) While We Need 3 Bytes?

In copy.c, in case we're copying a 3x3 bmp image, this piece of code adds the calculated padding to the bmp // then add it back (to demonstrate how) for (int k = 0; k < padding; k++) { fputc(...