Search
1000 results for “bitman”
-
Re-reading old code and I’m reminded of this old trick for doing bit-manipulation:
I was trying to shift right an u8 by a value between 1 and 8 bits:
myu8 >> (8 - shift)If
shiftequals 0, this would be an 8 bits shift, I wanted the result to be zero (all bits shifted), but that's not how (some) CPUs work; so it's undefined behaviour, and in Rust, the compiler will throw a compile error (if it's a const shift), or panic at runtime in debug mode.One could test if
shiftis 8, and adjust code accordingly, but this adds branches and even more code.So the trick to work around that is simply... to shift twice ! One time for the first bit, and another for the last (potential 7):
(myu8 >> 1) >> (8 - shift - 1)And that's how one can do this operation fully branchless.
(another version of this post appeared on a now-defunct instance)
-
Appeals Court Affirms U.S. Navy Should Pay $154k in Piracy Damages, not $155m
-
The real takeaway here is that +1 and -1 have simple and predictable effects on bit-masks and are really valuable for complex bit manipulation. If you're doing crazy stuff with bits, they're handy tools to keep close.
-
Будни ретрогеймера: а я сказал — BITMAN
Ретрогейминг — довольно популярное сейчас увлечение старыми компьютерными и видеоиграми, от истоков индустрии и до того момента, в который актуальное нынешнее превращается в пыльное ретро. На данный момент эта условная граница пролегает где-то между поколениями PlayStation 2 и 3, в начале 2000-х годов. Это явление включает в себя любопытные девиации в виде коллекционирования всех сортов, цифровой археологии, киберспорта и компьютерного творчества, но в основе его всё же находится вполне банальная игра в игры прошлых лет. Некоторым даже искренне нравится это занятие — ведь раньше было лучше, и в этом утверждении вполне можно отыскать крупицу истины. В современном мире вовсе не обязательно использовать реальные игровые устройства, картриджи и диски, но именно они являются краеугольным камнем ретрогейминга, источником всех этих старых игр. И если возжелать обратиться к этому подлиннику, обнаружится проблема: в 21-ом веке эти артефакты требуют обслуживания, мелкого ремонта и восстановления, а зачастую ещё и адаптации под современные реалии. Хотя в своих публикациях я обычно касаюсь более хардкорных граней ретрокомпьютинга, я тоже частенько ковыряюсь в старых приставках. Особенно кучно они пошли в этом году, и это навело на мысль посвятить этому занятию статью. Простая возня со старым железом, без мучительных копаний в википедийных фактах и прочей истории, околотехническое творчество и решение разнообразных проблем подручными средствами. Приступаем!
https://habr.com/ru/companies/ruvds/articles/845972/
#ruvds_статьи #ретрогейминг #консоль #игровая_приставка #sega #sega_megadrive #sega_mega_drive #sega_genesis #bitman #16bit #16bit_games #моддинг #pal #ntsc
-
Будни ретрогеймера: а я сказал — BITMAN
Ретрогейминг — довольно популярное сейчас увлечение старыми компьютерными и видеоиграми, от истоков индустрии и до того момента, в который актуальное нынешнее превращается в пыльное ретро. На данный момент эта условная граница пролегает где-то между поколениями PlayStation 2 и 3, в начале 2000-х годов. Это явление включает в себя любопытные девиации в виде коллекционирования всех сортов, цифровой археологии, киберспорта и компьютерного творчества, но в основе его всё же находится вполне банальная игра в игры прошлых лет. Некоторым даже искренне нравится это занятие — ведь раньше было лучше, и в этом утверждении вполне можно отыскать крупицу истины. В современном мире вовсе не обязательно использовать реальные игровые устройства, картриджи и диски, но именно они являются краеугольным камнем ретрогейминга, источником всех этих старых игр. И если возжелать обратиться к этому подлиннику, обнаружится проблема: в 21-ом веке эти артефакты требуют обслуживания, мелкого ремонта и восстановления, а зачастую ещё и адаптации под современные реалии. Хотя в своих публикациях я обычно касаюсь более хардкорных граней ретрокомпьютинга, я тоже частенько ковыряюсь в старых приставках. Особенно кучно они пошли в этом году, и это навело на мысль посвятить этому занятию статью. Простая возня со старым железом, без мучительных копаний в википедийных фактах и прочей истории, околотехническое творчество и решение разнообразных проблем подручными средствами. Приступаем!
https://habr.com/ru/companies/ruvds/articles/845972/
#ruvds_статьи #ретрогейминг #консоль #игровая_приставка #sega #sega_megadrive #sega_mega_drive #sega_genesis #bitman #16bit #16bit_games #моддинг #pal #ntsc
-
Будни ретрогеймера: а я сказал — BITMAN
Ретрогейминг — довольно популярное сейчас увлечение старыми компьютерными и видеоиграми, от истоков индустрии и до того момента, в который актуальное нынешнее превращается в пыльное ретро. На данный момент эта условная граница пролегает где-то между поколениями PlayStation 2 и 3, в начале 2000-х годов. Это явление включает в себя любопытные девиации в виде коллекционирования всех сортов, цифровой археологии, киберспорта и компьютерного творчества, но в основе его всё же находится вполне банальная игра в игры прошлых лет. Некоторым даже искренне нравится это занятие — ведь раньше было лучше, и в этом утверждении вполне можно отыскать крупицу истины. В современном мире вовсе не обязательно использовать реальные игровые устройства, картриджи и диски, но именно они являются краеугольным камнем ретрогейминга, источником всех этих старых игр. И если возжелать обратиться к этому подлиннику, обнаружится проблема: в 21-ом веке эти артефакты требуют обслуживания, мелкого ремонта и восстановления, а зачастую ещё и адаптации под современные реалии. Хотя в своих публикациях я обычно касаюсь более хардкорных граней ретрокомпьютинга, я тоже частенько ковыряюсь в старых приставках. Особенно кучно они пошли в этом году, и это навело на мысль посвятить этому занятию статью. Простая возня со старым железом, без мучительных копаний в википедийных фактах и прочей истории, околотехническое творчество и решение разнообразных проблем подручными средствами. Приступаем!
https://habr.com/ru/companies/ruvds/articles/845972/
#ruvds_статьи #ретрогейминг #консоль #игровая_приставка #sega #sega_megadrive #sega_mega_drive #sega_genesis #bitman #16bit #16bit_games #моддинг #pal #ntsc
-
Hermanos Ilabaca estrena «Alma Mia (Remix)» junto a DJ Bitman, parte de su EP de Remixes | vía #HyperMusicaCL
#collagecomunicaciones #djbitman #hermanosilabaca #lanzamientos
-
Hermanos Ilabaca estrena «Alma Mia (Remix)» junto a DJ Bitman, parte de su EP de Remixes | vía #HyperMusicaCL
#collagecomunicaciones #djbitman #hermanosilabaca #lanzamientos
-
📬 US-Marine muss Schadenersatz wegen Piraterie leisten
#Rechtssachen #Bitmanagement #DavidKennedy #EdwardJDamich #Schadenersatz #SoftwarePiraterie #Urheberrechtsverletzung #USMarine https://tarnkappe.info/artikel/rechtssachen/us-marine-muss-schadenersatz-wegen-piraterie-leisten-259650.html -
📬 US-Marine muss Schadenersatz wegen Piraterie leisten
#Rechtssachen #Bitmanagement #DavidKennedy #EdwardJDamich #Schadenersatz #SoftwarePiraterie #Urheberrechtsverletzung #USMarine https://tarnkappe.info/artikel/rechtssachen/us-marine-muss-schadenersatz-wegen-piraterie-leisten-259650.html -
📬 US-Marine muss Schadenersatz wegen Piraterie leisten
#Rechtssachen #Bitmanagement #DavidKennedy #EdwardJDamich #Schadenersatz #SoftwarePiraterie #Urheberrechtsverletzung #USMarine https://tarnkappe.info/artikel/rechtssachen/us-marine-muss-schadenersatz-wegen-piraterie-leisten-259650.html -
📬 US-Marine muss Schadenersatz wegen Piraterie leisten
#Rechtssachen #Bitmanagement #DavidKennedy #EdwardJDamich #Schadenersatz #SoftwarePiraterie #Urheberrechtsverletzung #USMarine https://tarnkappe.info/artikel/rechtssachen/us-marine-muss-schadenersatz-wegen-piraterie-leisten-259650.html -
📬 Piraterie: US-Marine-Freibeutern droht Entscheidung
#Kurios #Rechtssachen #BitmanagementSoftware #BSContactGeo #Piraterie #Raubkopie #Softwarelizenz #USMilitär https://tarnkappe.info/artikel/rechtssachen/piraterie-us-marine-freibeutern-droht-entscheidung-253960.html -
📬 Piraterie: US-Marine-Freibeutern droht Entscheidung
#Kurios #Rechtssachen #BitmanagementSoftware #BSContactGeo #Piraterie #Raubkopie #Softwarelizenz #USMilitär https://tarnkappe.info/artikel/rechtssachen/piraterie-us-marine-freibeutern-droht-entscheidung-253960.html -
📬 Piraterie: US-Marine-Freibeutern droht Entscheidung
#Kurios #Rechtssachen #BitmanagementSoftware #BSContactGeo #Piraterie #Raubkopie #Softwarelizenz #USMilitär https://tarnkappe.info/artikel/rechtssachen/piraterie-us-marine-freibeutern-droht-entscheidung-253960.html -
Re-reading old code and I’m reminded of this old trick for doing bit-manipulation:
I was trying to shift right an u8 by a value between 1 and 8 bits:
myu8 >> (8 - shift)If
shiftequals 0, this would be an 8 bits shift, I wanted the result to be zero (all bits shifted), but that's not how (some) CPUs work; so it's undefined behaviour, and in Rust, the compiler will throw a compile error (if it's a const shift), or panic at runtime in debug mode.One could test if
shiftis 8, and adjust code accordingly, but this adds branches and even more code.So the trick to work around that is simply... to shift twice ! One time for the first bit, and another for the last (potential 7):
(myu8 >> 1) >> (8 - shift - 1)And that's how one can do this operation fully branchless.
(another version of this post appeared on a now-defunct instance)
-
Re-reading old code and I’m reminded of this old trick for doing bit-manipulation:
I was trying to shift right an u8 by a value between 1 and 8 bits:
myu8 >> (8 - shift)If
shiftequals 0, this would be an 8 bits shift, I wanted the result to be zero (all bits shifted), but that's not how (some) CPUs work; so it's undefined behaviour, and in Rust, the compiler will throw a compile error (if it's a const shift), or panic at runtime in debug mode.One could test if
shiftis 8, and adjust code accordingly, but this adds branches and even more code.So the trick to work around that is simply... to shift twice ! One time for the first bit, and another for the last (potential 7):
(myu8 >> 1) >> (8 - shift - 1)And that's how one can do this operation fully branchless.
(another version of this post appeared on a now-defunct instance)
-
Re-reading old code and I’m reminded of this old trick for doing bit-manipulation:
I was trying to shift right an u8 by a value between 1 and 8 bits:
myu8 >> (8 - shift)If
shiftequals 0, this would be an 8 bits shift, I wanted the result to be zero (all bits shifted), but that's not how (some) CPUs work; so it's undefined behaviour, and in Rust, the compiler will throw a compile error (if it's a const shift), or panic at runtime in debug mode.One could test if
shiftis 8, and adjust code accordingly, but this adds branches and even more code.So the trick to work around that is simply... to shift twice ! One time for the first bit, and another for the last (potential 7):
(myu8 >> 1) >> (8 - shift - 1)And that's how one can do this operation fully branchless.
(another version of this post appeared on a now-defunct instance)
-
Re-reading old code and I’m reminded of this old trick for doing bit-manipulation:
I was trying to shift right an u8 by a value between 1 and 8 bits:
myu8 >> (8 - shift)If
shiftequals 0, this would be an 8 bits shift, I wanted the result to be zero (all bits shifted), but that's not how (some) CPUs work; so it's undefined behaviour, and in Rust, the compiler will throw a compile error (if it's a const shift), or panic at runtime in debug mode.One could test if
shiftis 8, and adjust code accordingly, but this adds branches and even more code.So the trick to work around that is simply... to shift twice ! One time for the first bit, and another for the last (potential 7):
(myu8 >> 1) >> (8 - shift - 1)And that's how one can do this operation fully branchless.
(another version of this post appeared on a now-defunct instance)
-
-
📬Bitmanagement fordert 155 Mio. USD von US-Regierung für Softwarepiraterie📬 https://tarnkappe.info/bitmanagement-fordert-155-mio-usd-von-us-regierung-fuer-softwarepiraterie/ #BitmanagementSoftwareGmbH #US-Bundesgerichtshof #Softwarepiraterie #Rechtssachen #BSContactGeo #US-Regierung #US-Marine
-
Gestern ist das Buch mit den Bitzaubersprüchen angekommen. Da muss man als Softwareentwickler einfach mal drin schmökern. Bevor es verboten wird, weil derartiges Wissen nur noch der KI vorbehalten ist.🤣
Da stehen ohne Ende so Sachen drin wie:
"Use the following formula to turn off the rightmost 1-bit in a word, producing 0 if none (e.g., 01011000 01010000):
x & (x – 1)"Wobei x ein 32Bit-Wert ist.
-
☑️ Day 40/100: #Leetcode daily question
🟨 Question: 2275. Largest Combination With Bitwise AND Greater Than Zero
This was an easy one for medium and I solved it using index bit count.
🐈⬛ Check out my #GitHub where I post all the daily streak 🔥 questions and #LeetcodeContest 🏆 solutions
🔗 Solution Link: https://github.com/akshatsingh1718/leetcode/tree/main/minimumNumberofChangestoMakeBinaryStringBeautiful
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
☑️ Day 39/100: #Leetcode daily question
🟨 Question: 3011. Find if Array Can Be Sorted
This was an easy one for medium and I solved it using bubble sort.
🐈⬛ Check out my #GitHub where I post all the daily streak 🔥 questions and #LeetcodeContest 🏆 solutions
🔗 Solution Link: https://github.com/akshatsingh1718/leetcode/tree/main/minimumNumberofChangestoMakeBinaryStringBeautiful
🔗 My Leetcode Github: https://github.com/akshatsingh1718/leetcode
-
🧑🎓Learning new things on
#leetcode is essential! 🚀 Today, from #Leetcode2220, I discovered Brian Kernighan’s Algorithm, which efficiently counts #setbits (bits set to 1) in nearly O(1) 🔥 time ⌛. Super handy for #bitmanipulation! 💡 #LeetCode #Coding #Algorithms #python -
🧑🎓Learning new things on
#leetcode is essential! 🚀 Today, from #Leetcode2220, I discovered Brian Kernighan’s Algorithm, which efficiently counts #setbits (bits set to 1) in nearly O(1) 🔥 time ⌛. Super handy for #bitmanipulation! 💡 #LeetCode #Coding #Algorithms #python -
🧑🎓Learning new things on
#leetcode is essential! 🚀 Today, from #Leetcode2220, I discovered Brian Kernighan’s Algorithm, which efficiently counts #setbits (bits set to 1) in nearly O(1) 🔥 time ⌛. Super handy for #bitmanipulation! 💡 #LeetCode #Coding #Algorithms #python -
🧑🎓Learning new things on
#leetcode is essential! 🚀 Today, from #Leetcode2220, I discovered Brian Kernighan’s Algorithm, which efficiently counts #setbits (bits set to 1) in nearly O(1) 🔥 time ⌛. Super handy for #bitmanipulation! 💡 #LeetCode #Coding #Algorithms #python -
🧑🎓Learning new things on
#leetcode is essential! 🚀 Today, from #Leetcode2220, I discovered Brian Kernighan’s Algorithm, which efficiently counts #setbits (bits set to 1) in nearly O(1) 🔥 time ⌛. Super handy for #bitmanipulation! 💡 #LeetCode #Coding #Algorithms #python -
Second year in a row that I have spatchcock’d the turkey and I am a believer! So good. (But Bitman is cray if he thinks it cooks in 45 minutes…) Happy #Thanksgiving! #Turkey #spatchcock