![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 12:37 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS批处理 & 脚本技术(批处理室) » How to use bitwise operations in set/a? |
| Printable Version 7,827 / 42 |
| Floor1 不得不爱 | Posted 2006-10-18 03:19 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
Originally posted by pengfei at 2006-10-17 23:11: Can this be blamed on me? It's also because Microsoft didn't explain the usage of SET/A clearly. Just SET /A, I believe everyone doesn't know how to use all the evaluated numeric expressions. How many of the following do you know? () - Grouping * / % - Arithmetic operators + - - Arithmetic operators << >> - Logical shift - Bitwise "AND" ^ - Bitwise "XOR" | - Bitwise "OR" = *= /= %= += -= - Assignment &= ^= |= <<= >>= , - Expression separator I think except for * / %+ - = *= /= %= += -= - which can be used, the others are not used. Hehe! |
|
| Floor2 electronixtar | Posted 2006-10-18 04:31 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
The rest are bitwise operations. Those who have studied C all know that
|
|
| Floor3 不得不爱 | Posted 2006-10-18 19:54 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
Originally posted by electronixtar at 2006-10-18 04:31: How to use it then? |
|
| Floor4 electronixtar | Posted 2006-10-18 21:59 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Tutorials in C language. If you still don't understand, I can consider writing a bat example. Bitwise operations are relatively fundamental operations in computers, characterized by high efficiency, but the disadvantage is that they are not easy to use, heh heh
[ Last edited by electronixtar on 2006-10-18 at 22:06 ] |
|
| Floor5 不得不爱 | Posted 2006-10-18 22:01 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
|
But you're using C language. I need something that works in CMD.
|
|
| Floor6 redtek | Posted 2006-10-18 22:24 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
electronixtar is too lazy to write, haha...
|
|
| Floor7 redtek | Posted 2006-10-18 22:30 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
Many tutorials (most tutorials) write about bit operations (almost) like textbook-style indoctrination, and there's no exciting place to be found : )
Just like when learning mathematics during student days, except for geometry where you can know what this thing is used for, things like a bunch of micro-calculus and so on that make you want to commit suicide. The book doesn't say the practicality of these things. But when it comes to financial analysis applications, these are all necessary. By then, I've long forgotten the formulas : ) Many course educations are too rigid ~ : ) |
|
| Floor8 electronixtar | Posted 2006-10-18 22:30 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
……Personally, there's not much difference between the operations in cmd and in C.
…………………………Don't force me to write…………………………-_-! [ Last edited by electronixtar on 2006-10-18 at 22:35 ] |
|
| Floor9 redtek | Posted 2006-10-18 22:36 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
Haha... Agreed~ :)
|
|
| Floor10 NaturalJ0 | Posted 2006-10-18 22:38 |
| 银牌会员 Posts 533 Credits 1,181 | |
|
There are a few that really don't know how to use. I'll write a few when I have time. = =b
|
|
| Floor11 redtek | Posted 2006-10-18 22:43 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
It is suggested that brother electronixtar start a new special thread to discuss batch processing bitwise operations right now : )
|
|
| Floor12 redtek | Posted 2006-10-18 22:48 |
| 金牌会员 Posts 1,147 Credits 2,902 | |
|
Everyone knows how to use these symbols, and books explain them clearly : )
However, I really dislike the teaching methods in books or textbooks, It can't make people immediately have that fascinated, forget to eat and sleep, crazy and must try now idea when seeing the bitwise operation course... So, this is the failure of the teaching method! It should be like this, after reading and practicing... "Oh, so that's how it is!" "Oh my god! Before I saw this tutorial, I actually took 10 years of detours!!!" "Oh! Bitwise operations are so amazing, they can also be used for intelligent operations in games like five-in-a-row..." Wait... What I dislike most about textbooks is that a large number of operations just don't explain the application inspirations of these calculations in real life and programming... |
|
| Floor13 不得不爱 | Posted 2006-10-18 22:52 |
| 超级版主 Posts 2,044 Credits 5,310 From 四川南充 | |
Originally posted by electronixtar at 2006-10-18 22:30: Then you write a pure bit operation in CMD for us to see! I really want to force you to write, hehe, I believe everyone wants to see the bit operation in CMD. |
|
| Floor14 electronixtar | Posted 2006-10-18 22:53 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
This……You guys are enough~~
|
|
| Floor15 NaturalJ0 | Posted 2006-10-18 22:55 |
| 银牌会员 Posts 533 Credits 1,181 | |
|
Go ahead, we're looking forward to it.
PS: By the way, why do I often see other posts when I refresh, and then it comes back to this post after a while? It's strange, and I've encountered this more than once. |
|
| 1 2 3 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |