This is a small one. Some time ago this table came in handy, testing out low level multiplication. And I just love multiplication tables. We all do, now don't we? :)

Member Avatar
+0 forum 0

I want to convert some numbers to binary, octal, and hexadecimal.. for example: . DECIMAL......BINARY......OCTAL.....HEXADECIMAL ................................................................... 1.................00000001.....001.......1 2.................00000010.....002.......2 And so on..

Member Avatar
Member Avatar
+0 forum 1

Hi friends, Can any one tell me the java program that how to convert Octa Decimal to HexaDecimal without using inbuild functions. I tried a lot but not successful. Please Please Please post the program... Thanks in advance..

Member Avatar
Member Avatar
+0 forum 2

Hello all. I'm writing a program that converts from any cominbation of base 2, 8, 10, and 16. So far I have this code and I want to convert from hexadecimal to octal but it doesn't work. I would appreciate any help. Thank you! Here is the code: #include "stdafx.h" #include <iostream> #include <string> #include <cmath> #include <fstream> #include <iomanip> #include <bitset> #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <limits> #include <sstream> #include <bitset> #define ULONG unsigned long #define FALSE 0 #define TRUE 1 #define BOOL int #define MAX 1000 using namespace std; void B2D(); void B2O(); void B2H(); void …

Member Avatar
Member Avatar
+0 forum 6

Please am new to java and i need an assistant on loading hexadecimal from a textfile and converting it into binary(Loader class) then the binary will be kept in another class(memory class). then the binary will be forwarded to another output file.

Member Avatar
Member Avatar
+0 forum 2

My code works for numbers that dont have a remainder of 10 or above, but whenever I get one with a remainder 10 or above it prints out the number, not the letter. Please help #include <iostream> #include <fstream> using namespace std; const int maxstack = 51; class stack_type { public: void clear_stack(); bool empty_stack(); bool full_stack(); void push (int numb); void pop (int& numb); int stack[maxstack]; int top; }; void main() { stack_type remainder_stack; int n, number, remainder; char response; remainder_stack.clear_stack(); do { cout << "Enter positive integer to convert to base 16: \n\n"; cin >> number; n = …

Member Avatar
Member Avatar
+0 forum 2

I intend to write a GUI java program which convert a decimal(base 10) to hexadecimal(base 16). Floating point decimals are also valid input. the code of my program private void myEnterButtonActionPerformed(java.awt.event.ActionEvent evt) { float mynum; mynum = Float.parseFloat(this.myNumberField.getText()); Float floatObject = Float.valueOf(mynum); myResultField.setText(Float.toHexString(mynum)); } but when I run the program, the input of 12.9 gives 0x1.9cccccp3, whereas I want the output as C.E6666 Help me to solve this problem.

Member Avatar
Member Avatar
+0 forum 13

Alright guys, I've been trying to think how to do this and I keep confusing myself. It's part of a project using piping in UNIX but first I need to get this small program running properly. I want to pass the final result (Hex value) to another program that will convert that result to binary. This is my current code, which runs fine, although I was thinking of storing the value where is says printf("A"); ,for example, into an array. Although, I need to pass the array to another program which is looking for an int value. I think the …

Member Avatar
Member Avatar
+0 forum 2

Let me start off by saying that this is homework, and I have most of it completed. However, I am stuck on how to convert decimal to hexadecimal. The assignment is to add two hexadecimal numbers and output the answer. If the length of the answer is greater than 10 digits, then output "Addition Overflow." I've completed the conversion of the two strings to decimal and added them together, now I think that I need to convert the answer back to a string. I know it's long, but if you would take the time to read my code, then it …

Member Avatar
Member Avatar
+0 forum 42

hi all, i am new to python programming.i need to develop one client server program. here once the client and the server start at the first time, the client automatically send one message to the server . this is a random message, here after the client is waiting for a packet of data of the form 54H68H 1AH 0DHOAH. after receiving this hexa decimal packet the client again send some random message to server and again waiting for the same hexa decimal packet. SO my question is "How can i send this Hexa decimal packet from server to client ?". …

Member Avatar
+0 forum 0

Stuck again, still, im learning from my large list of mistakes, haha so this time im trying to convert a decimal to hexadecimal, i tried using hex(number) but its not suitable for the situation as this returns a string. and i dont know how or if i can convert a string to hexadecimal. I tried to use string formatting as follows; ` return "%x" % num ` the objective is as follows """ Format string output by using the '%' operator Examples >>> 1.0/3 0.33333333333333331 >>> print "%.2f" % (1.0/3) # Convert to floating point with 2 decimal place 0.33 …

Member Avatar
Member Avatar
+0 forum 9

int main(){ int near * ptr=( int *)0XFFFF; ptr++; ptr++; printf(ā€œ%pā€,ptr); return 0; } Output:0003 why the op is 3 and how to convert 0XFFFF into its decimal equivalent?

Member Avatar
Member Avatar
+0 forum 2

I'm writing a program to convert Decimal numbers to binary, hexadecimal, and BCD as a refresher before i start getting code assignments in school. I'm almost done, but i have a seg_fault (compiler says decToHex function) in 1 function and i am hoping for some feedback on the others. I'll break it up a little so it's not 1 giant block of code and attach the .CPP [B]Class Definition[/B] [CODE] class ConvertDecimal { public: ConvertDecimal(); //void print(); private: int MAX_SIZE; void Convert (); string decToBinary (int decimal); string decToHex (int decimal); string decToBCD (int decimal); char hex(int num); string BCD(char …

Member Avatar
Member Avatar
+0 forum 7

I'm writing a program that adds two hexadecimal numbers of up to ten digits. I'm trying to use the POW function, but for some reason it's underlined. Why is that? [CODE] // hex addition.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <cmath> using namespace std; void convertToDec(string, string); int _tmain(int argc, _TCHAR* argv[]) { //assign values to last six hex characters //convert both inputs to dec //add two dec numbers //convert back go hex for answer string input; string input2; string hex[16] = {"0", "1", "2", "3", "4", "5", "6", …

Member Avatar
Member Avatar
+0 forum 2

Hello, I'm trying to represent the system date in a sequence such as: dd mm yy yy So far i got: dd mm yyy so, the year is represented on 2 ytes, but I only have 3 characters, i need to split after the first character and then add a zero in from of the first character. for example 2012 in hex = 7dc I need to turn it in 07 DC I could not find anything regardin spliting without a separator... Any help is apreciated :)

Member Avatar
Member Avatar
+0 forum 1

Never mind, I found out. :)

Member Avatar
Member Avatar
+0 forum 1

Hey guys, it's been a while since i've had to do any assembly programming but it's come up again in a course of mine to haunt me :p We're trying to simulate reverse polish notation, which is fairly simple..and all we have to implement is addition/subtraction, with a few other conditions such as exiting when an X is input, and displaying an E when anything other then X, +, - , 0-9 is input. My issue is coming up now that I have my IJVM code working for addition and subtraction, but for numbers higher then 10 which obviously is …

Member Avatar
+0 forum 0

Hey im new in this forum but really need help with making program on assembly 8086 that will take a string of 4 characters , then check if they are right and after that convert them to binary and decimal, then again hexadecimal, and in the end print something like this : ADRESS: BINARY: DECIMAL: HEXADECIMAL: FF00 1111111100000000 65280 16500 D3C2 1101001100101100 54060 1614 3344 0011001101000100 13124 3344 Im actually very bad in assembly , but im good in C , so i wrote it and tried to convert it to assembly, it didn't work :( , so it took …

Member Avatar
Member Avatar
+0 forum 3

I think its more than a year that I ask my questions about programming in this forum.Looks like its the time that I help a little too. So I wanna put my best here.I hope it'll help some one. Still I'll appreciate any suggestion. Another point,It was my first time commenting my code.So I'm waiting for your opinions about it. Thanks you all [ATTACH]21531[/ATTACH] [ATTACH]21532[/ATTACH] This program converts number bases.Because of the lack of alphabets,You may encounter nonsense characters if you use bases greater than 62. In this program I use both capital and small alphabets which means its case …

Member Avatar
Member Avatar
+0 forum 6

Hi, This is probably in the wrong place but I've looked everywhere for help, and nothing yet. I have a game save for an indie game, and I'm trying to edit the amount of coins I have. The method I have tried hasn't worked and I'm unsure why. Here was my method: 1) Open the game save in HxD (or a hex edit program) 2) Assuming I have 10000 coins, search for the integer 10000 3) This will highlight the hex value for 10000 4) Then replace this value with something like 30000 5) Rehash & Resign the save 6) …

Member Avatar
Member Avatar
+0 forum 1

This is a conversion question that has me stumped. I need to convert an unsigned char to a signed float. Some examples: 0xFF becomes 1.0f 0x00 becomes -1.0f 0x80 becomes ~0.0f The only idea that I could come up with was a massive switch statement. But a switch statement will be slow and I need this to run fast. Any ideas?

Member Avatar
Member Avatar
+0 forum 2

Program is suppose to convert binary to hex.. it says that i need a class/struct/union to the left of ".substr" but im pretty sure convert should be working.. [CODE]#include <iostream> #include <string> using namespace std; int main () { string convert [8]; string bin[16]= {"0000", "0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"}; string hex[16]= { "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}; string binfinal; convert[0]= convert.substr (0,4); convert[1]= convert.substr (4,4); convert[2]= convert.substr (8,4); convert[3]= convert.substr (12,4); convert[4]= convert.substr (16,4); convert[5]= convert.substr (20,4); convert[6]= convert.substr (24,4); convert[7]= convert.substr (28,4); for(int i=0; i< 8; i+=4) if (convert[i] == bin[0]) { cout << hex[0]; } else if (convert[i] == bin[1]) { cout << hex[1]; } …

Member Avatar
Member Avatar
+0 forum 5

I've been scouring the internet and my textbooks and haven't found any good explanations about how to incorporate hexadecimal numbers into my C++ code. I am currently working on a program that acts as a simulated computer environment to run a simulated machine language in the console a maximum of 16 instructions long. I already have the code required to read the instruction set from a .txt file and am working on loading it into an array representing memory. I know that machine language instructions are hexadecimal instructions 4 bytes long. My problem is trying to find a way to …

Member Avatar
Member Avatar
+0 forum 8

Trying to convert from binary to hex but for some reason it keeps bringing up the error instead of the output [CODE] #include<iostream> #include<string> #include<cmath> using namespace std; void BintoHex (int[]); bool CheckBin (int[], bool); void Hexadecimal (int[]); string hexadecimal; void main() { int bin[4]; int binary; bool reentry = true; do BintoHex(bin); while (CheckBin(bin, reentry)== true); Hexadecimal (bin); cin>> binary; } void BintoHex( int bin[]) { string Bina; int binval; bool loop = true; cout<< "Enter binary value: "; cin>> Bina; binval = Bina.length(); //if(Bina.length() >= 33) // cout<<"Error: Invalid character length"<<endl; do { if (binval == 4) { …

Member Avatar
Member Avatar
+0 forum 5

ok so for some reason its telling me my "else" has no matching "if" in line 51, i have to make it so the binary output is spaced which im pretty sure i did and has to have a separate output if the character length is more than 8 [CODE]#include<iostream> #include<string> #include<cmath> using namespace std; void HextoBin (char[]); void Binary (char[]); void CheckHex (char[]); string binary; void main() { char hex[8]; int hexadecimal; HextoBin (hex); Binary (hex); cin>> hexadecimal; } void HextoBin( char hex[]) { string Hexa; int hexval; cout<< "Enter hexadecimal value: "; cin>> Hexa; hexval = Hexa.length(); do …

Member Avatar
Member Avatar
+0 forum 9

Hey guys I am currently writing a code that will take the user input of a number and convert it to its hexadecimal form with the use of Stack ADT. This is what I have so far and would appreciate any help. [CODE]#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include "stack.h" int main(void) { int num; char alpha; int* digit; STACK* stack; stack = createStack (); printf("Please enter your integer (decimal): \n"); scanf("%d" , &num); while(num > 0) { digit = (int*) malloc (sizeof(int)); *digit = num % 16; push (stack, digit); num = num/16; } while (!emptyStack (stack)) { digit …

Member Avatar
Member Avatar
+0 forum 1

i have a simple question: I want to define a hex character array in C, but I don't want to have to define the elements one at a time. my programme needs an hexadecimal array as input of 128 bits. for example, [code=c]unsigned char temp2[32]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 ,0x55 ,0x66 ,0x77 ,0x88 ,0x99 ,0xaa ,0xbb ,0xcc ,0xdd ,0xee ,0xff};[/code] the variable temp2 values need to be assigned dynamically.. since i have another integer array of size 32.e.g. [code=c]paintext[32]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}[/code] which will be converted to hexadecimal and dynamically allocated to temp2 ___________________________________________________________________________________ I am exactly working on AES algorithm here …

Member Avatar
Member Avatar
+0 forum 3

Hello, I would like some help on this one problem in my assignment. I have completed the table but something caught my attention and i feel i did something wrong. I attached the same table i filled out on this thread. I would like help on the first row. My answers for the first row was: 18 ? 0x12 22 ? I think the answer for the 2's complement is 0001 0010 (binary) because im assuming its asking to represent the decimal in 2's complement format. So if thats the case, Sign magnitude column should also be 0001 0010, am …

Member Avatar
Member Avatar
+0 forum 2

The following lines of code output "FFFFFFFF" #include <stdio.h> int main(void) { int i; i=-1; printf("\n%X\n",i); return 0; } This is the 32-bit representation of -1 in Hex. I'm trying to get it to output fewer bits: e.g. 24-bit: FFFFFF In fact, the output I want needs to be 6 digits in all cases. So, if I replaced i=-1 with i=1 I need the output to be 000001. I can do this by padding with 0's (i.e., use printf("\n%06X\n",i);) but the negative case still outputs FFFFFFFF. I vaguely understand why this is happening, but not sure the easiest way to …

Member Avatar
Member Avatar
+0 forum 7

hi i really need help, i m trying to write a program that displays in a textbox a talbe of the binary, octal, and hexadecimal equivalents of the decimal numbers in range 1-222. Plz help i m new to vb....Thks you

Member Avatar
Member Avatar
+0 forum 3

The End.