• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 19:15
CET 01:15
KST 09:15
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation13Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
[TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? SnOw's ASL S20 Finals Review BW General Discussion
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Clair Obscur - Expedition 33 Should offensive tower rushing be viable in RTS games? Stormgate/Frost Giant Megathread Nintendo Switch Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread About SC2SEA.COM Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2144 users

[help] Hamming Decoder

Blogs > Sinensis
Post a Reply
Sinensis
Profile Blog Joined April 2009
United States2513 Posts
March 02 2010 18:54 GMT
#1
I need to implement a Hamming Decoder using java. I'll explain the specifications:

I need to be able to input a 15-bit string, the program will then determine and output the nearest codeword then it will output the original 11-bit message; there will be at most 1 error that needs correcting.

(here is the parity check matrix for a [15,11] code:

[0 0 0 0 1 1 1 1 1 1 1 1 0 0 0
1 1 1 0 0 0 0 1 1 1 1 0 1 0 0
0 1 1 1 0 1 1 0 0 1 1 0 0 1 0
1 0 1 1 1 0 1 0 1 0 1 0 0 0 1]

)

Even some strong pseudocode would be of immense help and would help me better prepare for this exam. I will paypal someone 5, 10, or whatever appropriate amount of money as compensation.

*
538
Profile Blog Joined November 2008
Hungary3932 Posts
March 02 2010 20:03 GMT
#2
A homework thread, for money?
BW fighting!
cgrinker
Profile Blog Joined December 2007
United States3824 Posts
March 02 2010 21:01 GMT
#3
Check sum?
Hamming Distance?
Grey Code?
Homework?
wo0py
Profile Blog Joined July 2006
Netherlands922 Posts
March 02 2010 22:10 GMT
#4
As a student in information sciences, i reckognize homework when a blog is posted about it.
We shouldnt recreate anger of the non-virtual world
Mickey
Profile Blog Joined July 2005
United States2606 Posts
March 02 2010 23:02 GMT
#5
I don't think this is technically a homework thread. He's offering compensation and not depending on help for free.

It's more like he's offering someone a small job.
tec27
Profile Blog Joined June 2004
United States3702 Posts
Last Edited: 2010-03-02 23:39:11
March 02 2010 23:36 GMT
#6
http://en.wikipedia.org/wiki/Hamming_code#General_algorithm this can probably help you quite a bit. Obviously you'll have to reverse what they give a bit to figure out how to detect errors, but the table should be super-helpful for figuring that out. I think if you sit down and work through it manually and then write the code yourself, it'll be a lot more beneficial to you in the long run.

Edit: Also, notice that "Parity bit 1 covers all bit positions which have the least significant bit set: bit 1 (the parity bit itself), 3, 5, 7, 9, etc.". You can check such a condition with (position & 0x1). That should be helpful for looping through all the bits you need to check.

And moreover, this should help you with the process as well: http://en.wikipedia.org/wiki/Hamming_code#Hamming.2811.2C7.29_code
Can you jam with the console cowboys in cyberspace?
Sinensis
Profile Blog Joined April 2009
United States2513 Posts
Last Edited: 2010-03-02 23:57:18
March 02 2010 23:53 GMT
#7
On March 03 2010 08:36 tec27 wrote:
http://en.wikipedia.org/wiki/Hamming_code#General_algorithm this can probably help you quite a bit. Obviously you'll have to reverse what they give a bit to figure out how to detect errors, but the table should be super-helpful for figuring that out. I think if you sit down and work through it manually and then write the code yourself, it'll be a lot more beneficial to you in the long run.

Edit: Also, notice that "Parity bit 1 covers all bit positions which have the least significant bit set: bit 1 (the parity bit itself), 3, 5, 7, 9, etc.". You can check such a condition with (position & 0x1). That should be helpful for looping through all the bits you need to check.

And moreover, this should help you with the process as well: http://en.wikipedia.org/wiki/Hamming_code#Hamming.2811.2C7.29_code


Many thanks tec. I decided to skip a couple of my classes today to get this done and it wound up being easier than I anticipated. Wikipedia was exactly what I used too, the only difference is they mainly focus on [7,4] codes and mine had to be of variable length. It turns out there's a formula that easily derives the parity check matrix for any length. Once I found that it was easy.

I'll post it in case you were interested:
Code length: n = 2^m - 1
Dimension: k = 2^m - m - 1
Min distance: d = 3
Please log in or register to reply.
Live Events Refresh
Replay Cast
23:00
WardiTV Mondays #59
CranKy Ducklings103
LiquipediaDiscussion
BSL 21
20:00
ProLeague - RO32 Group D
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
ZZZero.O261
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nathanias 181
Ketroc 48
StarCraft: Brood War
Artosis 550
ZZZero.O 261
NaDa 25
yabsab 7
Dota 2
monkeys_forever230
NeuroSwarm55
League of Legends
JimRising 476
Counter-Strike
fl0m1623
Super Smash Bros
hungrybox564
AZ_Axe126
Heroes of the Storm
Khaldor170
Other Games
Grubby4110
summit1g3392
ToD135
Maynarde114
febbydoto3
Organizations
Other Games
EGCTV863
gamesdonequick772
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• Hupsaiya 82
• RyuSc2 40
• HeavenSC 25
• musti20045 23
• Adnapsc2 15
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 4
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21387
• Ler49
League of Legends
• Doublelift3145
Other Games
• imaqtpie1722
Upcoming Events
Wardi Open
11h 45m
Monday Night Weeklies
16h 45m
Replay Cast
22h 45m
WardiTV Korean Royale
1d 11h
BSL: GosuLeague
1d 20h
The PondCast
2 days
Replay Cast
2 days
RSL Revival
3 days
BSL: GosuLeague
3 days
RSL Revival
4 days
[ Show More ]
WardiTV Korean Royale
4 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
IPSL
5 days
Julia vs Artosis
JDConan vs DragOn
RSL Revival
6 days
Wardi Open
6 days
IPSL
6 days
StRyKeR vs OldBoy
Sziky vs Tarson
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.