Cheatography
                https://cheatography.com
            
        
        
    
                   
                            
    
                    A cheatsheet for computer science, python and pseudocode
                    
                 
                    
        
        
            
    
        
                            
        
                
        
            
                                | Converting
                        
                                                                                    
                                                                                            | From Hexadecimal to decimal | From Binary to Hexadecimal |  
                                                                                            | BF=B*161+ F*160=11*161+ 15*160=171+15=191 | 1) Find the biggest power of 16 that fits in - number of positions |  
                                                                                            |  | 3501- 16,  256, 4096 |  
                                                                                            |  | 2) Find the biggest multiplier |  
                                                                                            |  | x*256, that fits? x=13=D |  
                                                                                            |  | 3501-13*256=173 |  
                                                                                            |  | Y16<173, 1016=A*16 |  
                                                                                            |  | 173-160=13, 13=D |  
                                                                                            |  | 3501(2)=DAD(16) |  
                                                                                            |  |  
                                                                                            | From Binary to decimal | From Decimal to binary |  
                                                                                            | Just multiplying 1 or 0 by 2 in the power of position | 1) find the biggest power of 2 that fits - number of positions |  
                                                                                            | 10100=1*24+1*22=20 | 63=25 |  
                                                                                            |  | 2) Find the biggest multiplier |  
                                                                                            |  | 63-32=31, 24 |  
                                                                                            |  | 31-16=15, 23 |  
                                                                                            |  | 15-8=7, 22 |  
                                                                                            |  | 7-4=3, 2^1 |  
                                                                                            |  | 3-2=1, 2^0 |  
                                                                                            |  | 63(10)=111111(2) |  
                                                                                            |  |  
                                                                                            | Hexadecimal to binary | Decimal to hexadecimal |  
                                                                                            | 1)Each number should represent the four digits in the binary number | 191:16=11.R => R*16=.9375+16=15 |  
                                                                                            | BF => 8 digits | if the number before is less than 16, then it is the first digit, if not, then keep counting |  
                                                                                            | B=11, 11=1011 | 11 => B |  
                                                                                            | F=15, 15=1111 | BF, reading backwards |  
                                                                                            | BF(16)=10111111(2) |  | 
            
                
                                                | X() gates
                        
                                                                                    
                                                                                            | These are XAND and XOR gates, they are exclusive |  
                                                                                            | So for XAND only if both inputs are identical it will give a 1 |  
                                                                                            | For XOR only if they are both different, it will give a 1 |  |  | N() gates
                        
                                                                                    
                                                                                            | The gates with N, such as NOR, NAND, XNOR, NOR, XNAND, are just gates with a NOT after them |  |  |  | 
            
                            
            
            
        
        
        
        
        
            
    
        
          
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment