Thứ Bảy, 6 tháng 12, 2008

PHÉP TOÁN XOR

Hôm nay ngẫu hứng tự nhiên thấy phép XOR hơi hay hay, nên viết lên mọi người tham khảo nhé.

Còn gọi là hàm không tương đương, Hàm cộng modul-2, Hay là phép Cộng có loại trừ. 

  1. Phương trình : Phương trình hàm XOR 2 biến được định nghĩa như sau :     

    F(AB) = AB + AB = A Å B

F = 1 khi tất cả các biến đầu vào có giá trị khác nhau. 

F = 0 khi các biến vào có giá trị giống nhau.


Bảng chân lý :  bảng chân lý hàm XOR có dạng như sau:
ABÅ B 
000
011
101
110

Trong phép hoán vị giá trị của 2 biến a,b dùng thuật toán xor đó.

Thứ Ba, 2 tháng 12, 2008

100 Greatest Science Discoveries of All Time

Tuy chưa đọc cuốn này nhưng nhìn sơ qua, mình có cảm giác sẽ đem lại nhiều điều thích thú cho người đọc. Nếu không tin, hay download và đọc đi nhé.
Throughout history, science has changed lives and dramatically altered the way in which the universe is perceived. Focusing on the 100 most significant scientific events of all time--from Archimedes' discovery of the two fundamental principles underlying physics and engineering (levers and buoyancy) in 260 B.C.E. to human anatomy, Jupiter's moons, electrons, black holes, the human genome, and more--storyteller Kendall Haven has created a ready reference for those seeking information on science discoveries. Brimming with fascinating and fun facts about 100 scientific breakthroughs, this collection presents the real stories behind the history of science, at the same time offering a panoramic overview of the history of science and an introduction to some of the most important scientists in history. Grades 6 and up.

About the Author
KENDALL HAVEN is a nationally recognized master storyteller and the author of numerous books, including Marvels of Math, Write Right!, and Close Encounters with Deadly Dangers. A former research scientist, he is based in Fulton, California.
Download here

Sams Teach Yourself C++ in One Hour a Day (6th Edition)

Theo mình học C/C++ theo kiểu mì ăn liền tuy không tốt nhưng trong các sách mình đã đọc, mình chỉ thấy cuốn này hay hơn các cuốn đã được xuất bản ở Việt Nam.
In just one hour a day, you’ll have all the skills you need to begin programming in C++. With this complete tutorial, you’ll quickly master the basics and then move on to more advanced features and concepts:
Master the fundamentals of C++ and object-oriented programming
Learn some of the more advanced features of C++
Learn the Standard Template Library and the containers and algorithms used in most real-world C++ applications
Learn how to build effective programs in C++ with hands-on exercises
Get expert tips on implementing C++ in the corporate environment

Learn on your own time, at your own pace
No previous programming experience required
Learn C++ and object-oriented design, programming, and analysis
Write fast and powerful C++ programs, compile the source code, and create executable files
Understand the latest ANSI standard
Use the Standard Template Library’s algorithms and containers to write feature-rich yet stable C++ applications
Develop sophisticated programming techniques with functions, arrays, variables, and smart pointers
Learn to expand your program’s power with inheritance and polymorphism
Master the features of C++ by learning from programming experts
Works with all ANSI C++ compilers
Jesse Liberty is the author of numerous books on software development, including best-selling titles on C++ and .NET. He is the president of Liberty Associates, Inc., where he provides custom programming, consulting, and training.

Siddhartha Rao, Microsoft MVP for Visual C++, has experience in programming driver and application software using C++. He is an expert in the Windows programming arena and works for a German software giant. He also moderates CodeGuru.com, a vibrant online programming community.

Bradley Jones, Microsoft MVP for Visual C++, runs a number of software development sites including Developer.com, CodeGuru.com, DevX, VBForums, Gamelan, and other JupiterWeb-owned sites.

Category: Programming
Covers: C++
User Level: Beginning–Intermediate

Register your book at informit.com/register for access to source code, example files, updates, and corrections as they become available.
Download here

Bài đăng phổ biến