Questions tagged [hexadecimal]

12 questions
30
votes
5 answers

If a number is too big does it spill over to the next memory location?

I've been reviewing C programming and there are just a couple things bothering me. Let's take this code for example: int myArray[5] = {1, 2, 2147483648, 4, 5}; int* ptr = myArray; int i; for(i=0; i<5; i++, ptr++) printf("\n Element %d holds %d…
stumpy
  • 417
  • 1
  • 4
  • 5
28
votes
22 answers

Why learn hexadecimal?

I've taken quite a few intro programming classes in my day, mostly just to get my feet wet in every different kind of programming I find. Not surprisingly, just about every class runs through the same format : intro to hardware, intro to software,…
jwegner
  • 201
  • 1
  • 3
  • 6
5
votes
2 answers

Endianess ARM Assembly Confusion

I'm writing code using arm assembly language for college and the I'm really confused about endianess. The default should be little endian but I'm sure the test string has been stored big endian. The first byte in memory at 0xA1000004 is 0x30 which…
2
votes
4 answers

Reduce number of digits by converting to alphanumeric data

We have an app that receives a web service request, processes it and sends it back to our client by another web service call. There is a unique field in the request, a tracking Id, which currently follow the pattern…
1
vote
3 answers

Parse 8 bytes to date time

I am trying to parse a file created by another software, but I cant identify a pattern on how this datetime is saved. There doesnt seem to be any consistency. Programming language of the software is C++, so I already tried the unix/epoch method…
rosi97
  • 135
  • 5
1
vote
2 answers

The number of characters of hexadecimal numbers

0xF, 0x0000000F (total width is 10 characters), and 0x0000000000000000F (total width is 18 characters) all mean 15 (decimal). Is it correct to say that there is no reason to add leading zeros to a smaller hex number beyond 10 characters in total? In…
user90726
  • 205
  • 2
  • 9
1
vote
2 answers

Different Number Base Systems

I am doing a summer assignment for AP Computer Science. For this I am learning about different number base systems and how to convert them. These topics led to me wondering about why programmers use different number base systems. So I was…
0
votes
3 answers

What is this numeral system notation?

I used Google search to convert numbers from one numeral system to another. 10 to binary is 0b1010; 10 to hexadecimal is 0xA. What's the meaning of 'b' and 'x', accordingly? I think these are abbrevations from binary and hexadecimal. I understand…
floreapaun
  • 31
  • 4
-1
votes
2 answers

Fast and simple hex compression

I'm working on a project that requires a TCP connection between a client and server. The current protocol encodes the data into hex and then sends it. However, hex increases the length of the payload which isn't really optimal from a networking…
Awn
  • 155
  • 1
  • 6
-2
votes
1 answer

C (Arduino): treat a #defined hex value as ASCII chars

This is Arduino code, but since it uses C syntax, and it's not Arduino-specific, I thought I'd ask here. I have a few values defined so: #define PID_RPM 0x0C Typically it's used as a hex number. But in one spot, I need to print the last 2 chars…
MrSparkly
  • 99
  • 3
-4
votes
3 answers

If you had to represent a large number concisely would you use base 36 or ZZ?

According to Wikipedia: In mathematics and computing, hexadecimal (also base 16, or hex) is a positional system that represents numbers using a base of 16. Unlike the common way of representing numbers with ten symbols, it uses sixteen…
1.21 gigawatts
  • 1,209
  • 1
  • 10
  • 22
-4
votes
4 answers

Number system conversion

Why can't we directly convert octal number to base 8 to hexadecimal base 16 directly ? We can convert to octal by first converting it into binary equivalent, or by converting it to decimal equivalent . But why can't we directly convert base 8 octal…
Zero001
  • 19
  • 1