Questions tagged [hexadecimal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
175 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
1 answer
45 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: ...
  • 3
0 votes
2 answers
233 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?
  • 15
0 votes
1 answer
105 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
1 answer
107 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
1 answer
3k 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
1 answer
79 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
1 answer
112 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 ...
  • 125
0 votes
2 answers
206 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(...
  • 17.4k