User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,589 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,613 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1077 | Replies: 4
Reply
Join Date: Nov 2007
Posts: 2
Reputation: Gary Parker is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Gary Parker Gary Parker is offline Offline
Newbie Poster

Self taught newb needs advice/assistance

  #1  
Nov 4th, 2007
Hi, this is my first post so forgive me if it is uninformed and well, rubbish.

I've taught myself things like Javascripting and PHP and the whole HTML thing from scratch in my free time at work. I work as a Team Manager at a call-centre for a UK based project named Top Up TV.

As part of this, i've been given a spreadsheet that works out "smartcard" offers and engineering rights using Binary and Hexidecimal coding. I need to find a way to distribute this to our staff so they can easily work out what a customer is either receiving, or more likely, not receiving. I cannot use the spreadsheet as it requires an upgrade to excel to work out the binary to hex codes.

Is it possible to use Javascript to reverse engineer an engineering code to work out what offers a customer has?

An example of the engineering code would be as follows.

9000000C00000002

This would translate as the customer having offers 63,60,31,30,1
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Location: Brisbane, Australia
Posts: 227
Reputation: sillyboy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
sillyboy's Avatar
sillyboy sillyboy is offline Offline
Posting Whiz in Training

Re: Self taught newb needs advice/assistance

  #2  
Nov 4th, 2007
Assuming you have the algorithm to reverse engineer the code, sure.
Reply With Quote  
Join Date: Nov 2007
Posts: 2
Reputation: Gary Parker is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Gary Parker Gary Parker is offline Offline
Newbie Poster

Re: Self taught newb needs advice/assistance

  #3  
Nov 4th, 2007
Originally Posted by sillyboy View Post
Assuming you have the algorithm to reverse engineer the code, sure.


I only have this within spreadsheet format just now. I need one that would split the 16 characters down individually and go from there, based on their values.
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,630
Reputation: peter_budo is just really nice peter_budo is just really nice peter_budo is just really nice peter_budo is just really nice 
Rep Power: 12
Solved Threads: 311
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Self taught newb needs advice/assistance

  #4  
Nov 4th, 2007
I just want to make a small side note that you can transfer, or better say save, your excel spreadsheets as XML document and use it with PHP or any other language that is able to process it...
This way you can also keep it easily uptodate too.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Self taught newb needs advice/assistance

  #5  
Nov 4th, 2007
Originally Posted by Gary Parker View Post

An example of the engineering code would be as follows.

9000000C00000002

This would translate as the customer having offers 63,60,31,30,1


Expand each hexadecimal digits to binary bits:

0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111

So the hexadecimal number:

9000000C00000002

Becomes binary

1001,0000,0000,0000,0000,0000,0000,1100,0000,0000,0000,0000,0000,0000,0000,0010

Each bit is an item. The leftmost bit is item 63, and the rightmost bit is item 0.

The ones are in bit numbers 63, 60, 31, 30, and 1. (bit 0 is rightmost)
Last edited by MidiMagic : Nov 4th, 2007 at 9:55 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC