## Conversion from Hexadecimal to binary

 Thread Tools Search this Thread
Conversion from Hexadecimal to binary
# 8
03-11-2014
Quote:
Originally Posted by aydj
How can I convert hexadecimal values to Binary from the second field to the end

Input:

Output:

Assuming 4 bits per nibble, I am missing something here.

Binary 23 is 00100011 and 345 is 0000001101000101 and 235 is 0000001000110101 ; where are the leading zeros? The OP requires a bit representation not a true hex to binary conversion.

The three zeros is in fact "0000000000000000" as a true hex to binary conversion.

If my assumption is wrong then ignore me...
 wisecracker View Public Profile for wisecracker Find all posts by wisecracker
# 9
03-14-2014
Quote:
Originally Posted by Akshay Hegde
See this might help you

https://www.gnu.org/software/gawk/ma...Functions.html

String Functions - The GNU Awk User's Guide

It's not working on solaris but work on cygwin. how can I make it work on Solaris 10
 aydj View Public Profile for aydj Find all posts by aydj
# 10
03-14-2014
On Solaris/SunOS system, change awk to /usr/xpg4/bin/awk , /usr/xpg6/bin/awk , or nawk, and try
 Akshay Hegde View Public Profile for Akshay Hegde Find all posts by Akshay Hegde
# 11
03-14-2014
Quote:
Originally Posted by Akshay Hegde
On Solaris/SunOS system, change awk to /usr/xpg4/bin/awk , /usr/xpg6/bin/awk , or nawk, and try
Not working, This is the output:
 aydj View Public Profile for aydj Find all posts by aydj
# 12
03-14-2014
Quote:
Originally Posted by aydj
Not working, This is the output:

Can you show what you have tried ? what is there in line 17 ?
 Akshay Hegde View Public Profile for Akshay Hegde Find all posts by Akshay Hegde
# 13
03-14-2014
 aydj View Public Profile for aydj Find all posts by aydj
# 14
03-14-2014
Okay, copy mystronum function from here Strtonum Function - The GNU Awk User's Guide, and try
 Akshay Hegde View Public Profile for Akshay Hegde Find all posts by Akshay Hegde

## Hexadecimal to binary operation

Dear all, I am trying to write c-program to read the following file containing hexadecimal values (snippet of big data file). I want to combine two hexadecimal values together like A0A03E01 and then would like to have the binary equivalent to perform further test on it. Unfortunately, it failed...

## Hexadecimal to Binary conversion

Hi Guys, Is it possible to convert the hexadecimal to Binary by unix command.....I could not figure out.... If I need to convert AF6D to binary...what could be the way to do? Thanks in advance!! ---------- Post updated at 02:57 AM ---------- Previous update was at 02:42 AM ---------- I...

## NAWK conversion of hexadecimal input to decimal output via printf, I am close I can feel it

I have searched and the answers I have found thus far have led me to this point, so I feel I am just about there. I am trying to convert a column of hexadecimal to decimal values so that I can filter out via grep just the data I want. I was able to pull my original 3 character hex value and...

## binary conversion

Why would a binary which was compiled on a Solaris-10 not be runnable in a SunOS 5.10? (they are supposed to be precisely equivalent). When I run the file command on it, it says: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped, no debugging information available...

## binary to ascii conversion

Hi, I have got a library file, created by compiling C code. The file information with "file" command, gives it a "application/x-archive" type file. I want to extract the release string of my software from this file, so that i can know which version of C files were used to create the lib. Can...

## binary file conversion

Hello folks, i have a binary text file but i am not able to convert into text format, please suggest. thanks.

## Binary conversion function

Is/are there any function(s) in C that convert(s) character/ASCII/Decimal to binary and vice versa? what about bcopy and strcpy?

## Decimal to Hexadecimal conversion

Hi frnds :) I need a small help... I have a very long file containing 20 digits decimal number which i want to convert into the corresponding 16 digit hexadecimal values. File looks like.... 11908486672755551741 05446378739602232559 04862605079740156652 . . . I tried the script for i...

## Binary file conversion

All, I want to convert multiple \0 005 characters to line feed 012 character in a binary file to make to readable. Here is the sample od -c file output: 0000000 254 355 \0 005 s r \0 * c o m . c i s c Here is the sample od -b file output: 0000000 254 355 000...

## shell script conversion to binary

My question is: i have a script called getevent to run i just call ./getevent can i convert this to make it binary executable and not letting my clients open it and see the code.??:( I am using Solaris 8.