Thursday, 23 April 2015

EE2020 Report on Pseudo-Random Number Generator

Pseudo-Random Number Generator
A pseudo-random number generator is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers.  It is central in applications such as simulations, electronic games, and cryptography. This report involves the design for building a basic pseudo-random number generator, and how the design is being carried out.  

Objectives
  1. Implement a 4-bits pseudo-random number generator defined by xk+1= (axk+c) mod m. Set a = 2, c = output of a 4-bit counter and m = 5. x0 can be keyed in by a 4-bit DIP switch.
  2. A push button resets back to the initial state, x0.
  3. A 7-segment displays the current number only if it is less than the previous number. Otherwise, nothing will be displayed on the 7-segment.

Design Overview
The system can be separated into three main blocks. A 2xk+ccircuit is implemented to read in initial state value from DIP and perform the operation by using an adder and counter. The sum is pass to mod 5 circuit to get the remainder. The output then feedback to 2xk+ccircuit to read the next state value. The display circuit will hold the current value xk+1as well as the previous value xk. A magnitude comparator is used to compare these two values and display xk+1if it is less that  xk.

QQ图片20150410153325.png
Figure 1: General design

Implementation

2Xk+C and reset control

74157 multiplexer is introduced to select between the read-in of the initial state or the subsequent states. The select signal is controlled by the push button. When the button is being pressed and hold, the next rising edge of the clock triggers select signal to be LOW for exactly one clock duration. The system is reset back to the initial state with multiplexer output the value from DIP switch. After which the select signal goes back to HIGH and remains HIGH. Multiplexer will then output the value obtained from mod 5 circuit.

Figure 2 shows the result of doubling a 4-bits number. It can be observed that by shifting the connections one bit to the left and wire the LSB to ‘0’, it is able to obtain 2xkwithout using any IC chip. The c value is obtained from a 74191 counter that counts up from 0000 to 1111. With its LD connected to the select signal, it will load back to 0000 when the system resets. The outputs from the multiplexer and the counter are feed into a 74283 adder.

xk
2xk
0001
0010
0010
0100
0011
0110
0100
1000
Figure 2: Doubling a 4-bits number

QQ图片20150411001837.png
Figure 3: 2xk+ccircuit

Mod 5

The output from the 2xk+c circuit is input to an adder and adds 0110 (6). If the result does not generate a carry, it shows the input number is less than 10. If the input is greater or equals to 10, a carry will be generated and the 4-bit adder output will be input+6-16which is equivalent to input-10. This reduces the input to a magnitude that is less than 10. The outputs from 2xk+c circuit and adder go into a multiplexer with adder’s CARRY OUT as the select signal. When CARRY OUT is ‘0’, the original number is less than 10, thus select the output from 2xk+ccircuit. When CARRY OUT is ‘1’, the original number is greater or equals to 10, but after minus 10 it will be less than 10, thus select the adder output. After obtain a number that is less than 10, the process repeats again. However, instead of adding 6, the second adder adds 1011 (11). Carry will be generated if the input is greater or equals to 5. Thus, the second multiplexer will output the mod 5 result.

The result is input to a shift register to hold for one clock duration. While shift register’s output is holding the value, it is feedback to the 2xk+ccircuit to perform the next operation.

QQ图片20150411015802.png
Figure 4: Mod 5 circuit

7-segment display

A 7-segment displays the current number xk+1only if it is less than the previous number xk. These two numbers can be obtained from the input and output of the shift register. The input stores the current value xk+1 while the output holds the previous value xk. A magnitude comparator is used to compare these two values and output a signal when xk+1is smaller than xk.
Signal from magnitude comparator will be HIGH only if xk+1< xk. This signal goes into the BI/RBO pin of the BCD-to-seven-segment decoder. If BI/RBO receives a LOW logic, all display will be blanked out. If it receives a HIGH logic, the decoder will decode the 4-bit input and display the corresponding decimal value on the common anode LED display.   
QQ图片20150411104553.png
Figure 5: BCD-7-segment display
Experiment Results
Figure 6 shows the predicted results when DIP switch is set to 0001. The system is able to output the correct  (2xk+1+c) mod 5value. After blank-out current outputs that are larger or equal to the previous output, only values quoted with ‘display’ is displayed. Whenever the push button is pressed, the system resets back to its initial state at the next rising edge clock. Thus, the system is able to meet all the project requirements.
QQ图片20150411225808.png
Figure 6: Predicted outputs

Repeated Counter Output
The counter will repeat 0000 twice after the system is reset back to the initial state by the push button. This is because the push button signal is aligned with the clock signal. When the push button signal goes LOW, it stays LOW for the entire clock duration, during this period counter inputs reflect to outputs which are 0000. When the push button signal goes back to HIGH after one clock duration, its rising edge overlaps with the rising edge of the clock. This prevents the counter from reacting to this clock rising edge, and it remains 0000 till the next clock rising edge.

If this repetition is not desired, the counter’s load signal can be modified such that it is able to react to the first clock rising edge after the system resets. Connect the push button as shown in Figure 7 below. The resultant output will be LOW when the button is being pressed, and HIGH when released. Input this new signal to the counter load pin while keeping the original push button signal connected to the multiplexer select pin. To reset, press and hold the pushbutton. The load signal goes LOW immediately, counter load back to 0000. The select signal goes LOW when there is a clock rising edge, multiplexer select the initial value. Release the push button while the select signal is still LOW, this will start the counting process from 0000. At the next clock rising edge, the multiplexer will select x1and counter will count up to 0001. A LED connected to the select signal may serve as an indicator for the timing to release the push button.
QQ图片20150412014935.png     QQ图片20150412022055.png
Figure 7: Load signal

Conclusion
This project provides a good exposure to various wiring skills. Most of the ICs used in this project involves 4-bit parallel inputs and outputs. This requires a very systematic way of color coding and the placement of ICs. Instead of using different color to represent different sub-blocks, it will be easier to observe if different color represents different 4-bit value at any point of time. Also, due to the limited space (two breadboards), it is extremely crucial to implement this project in an area efficient way. Thus, the experience gained from this project better equipped me for future journey.

Presentation Reflection

In terms of preparation, I did not prepare well for this presentation. I started to prepare my slides and scripts only on the morning of the presentation date. I went through my scripts a couple of times but I did not have enough time to practice. I thought it would not be a difficult task since I only required to deliver what I wrote in my problem solution essay. However it was not the case here. Due to the lack of practice, I could not remember what I had to say. I have to constantly refer back to my script. I was so nervous, because of that I could not identify the line where I should continue from. During the presentation one of my slides had overlapping contents. It was probably due to the errors in file conversion. This allow me to learn that it is important to check all the presentation materials one more time before the actual presentation starts. In conclusion, I will take this experience as a precious lesson learned and improve on my future presentation skills.

Friday, 17 April 2015

Problem Solution Essay Draft 3

Nowadays, social media deeply penetrate young people's daily life. From sustaining friendships to expanding social circles, teenagers are heavily dependent on social media to construct their relationships with other people. In Alone Together by Turkle (2012), she mentions that while social media is used as a tool to connect people, it is now causing wider separation. This isolation is extremely harmful to teenagers as they are in a crucial age of developing self-awareness through interacting with other people. Singapore has a 73% Internet penetration rate, this will cause great impact if social isolation becomes a new normal. The only effective solution is for Infocomm Development Authority of Singapore (iDA) to pose regulations that draw clearer distinctions between individual's online social life from real life, so that teenagers will not trade offline social with social media.

In order to gain public usage, social network providers are making their services as close as possible to people's real life. Real life friends become online follower and online followers become real life friends. Teenagers growing up in such environment do not observe the difference between online social and offline social. As social media appears to be more efficient and powerful, it will draw teenager’s attention away from their offline social life. It is more common to observe groups of young people gather together but instead of spending time with their friends, they put more attention to their phones. As the definitions of virtual and real are not clearly defined and differentiated, teenagers who spend on average 5.5 hours per day on social media, will be most vulnerable to social isolation.

Social media only provide a mental relief but leave people physically and emotionally alone. It is true that social media provides a fast channel for teenagers to reach out to one another and easily get connect to people across space. While teenagers start to rely on social media to develop their relationships, they also let the technology led them to undesirable places,  slowly without notice. Online information can be created, edited and deleted in a way that people can choose how they are perceived. Teenagers begin to build their relationships merely for the sake of connections and hide their true self from one another. This generates a wider separation between teenagers and the society.

Social isolation caused by social media largely affects teenager's communication skill. As efficiency is the priority in online social media communications, the language used is generally short, plain and straight to the point. When conveying a message, some details are skipped in order to obtain a fast response and feedbacks. Other factors such as body language, eye contact, the tone of voice are crucial in conducting an effective communication, but none of these can be seen in social media communications which opposite parties interact with each other through a flat screen and digitized information.

The solution proposed by Jones in ‘Technology: Creator or Savior of Social Isolation’ suggests that, technology can provide a platform to bring people together, to tighten social bonds. But the author does not demonstrate that it is the same technology that is causing all the trouble. As people demand more on technology and less on each other, there will be absolutely no way that technology can reverse the situation no matter how advance it will be. Instead, it will only exacerbate the social isolation.

In order to solve the problem, it is necessary to target at its root cause. iDA should restrict social media providers from allowing their teenage users to access their full services. Some ways include limiting the time which teenagers are allowed to access their social network accounts and the amount of contents they are allowed to upload. This will force teenagers to keep their social lives away from social media. Once the connection between online social life and real life is broken, teenagers will begin to realize that they cannot apply what they obtain from online to real life. They will slowly but definitely move their focus away from the virtual world.

Schools, being the most important education center, play an important role in prevent social isolation among teenagers. Schools should have their networks block out all major social networking sites and at the same time reinforce the difference between online and offline social. Even though this may seem to be a restrictive  measure, but it is necessary for teenagers to develop a right and healthy social life. Schools can also organize activities such as class outings and overseas trips, to reconstruct the importance of real world interactions and communications.

Individuals must not forgo their real social life in exchange for greater dependence on the virtual. Teenagers been a most vulnerable group will easily being carried away and become isolated and at the same time losing their communication skills. It is necessary for powerful authorities such as iDA to reverse the situation. As such, teenagers are able to enjoy the benefits of social media while minimize the harm associated with it.



Reference
Turkle, S. (2012). Alone together. New York, NY: Basic Books.

Government of Singapore. Infocomm Development Authority of Singapore. (2012). Individuals who are Internet users 2012. [Data file]. Retrieved from: http://www.ida.gov.sg/Tech-Scene-News/Facts-and-Figures

Sim, F. (2013 January 11). S’pore youths spending more time online: study. Yahoo News Singapore. Retrieved from: https://sg.news.yahoo.com/s-pore-youths-spending-more-time-online--study-100333925.html

Jones, C. Technology: Creator or Savior of Social Isolation [Supplemental material]. De Vry University. Retrieved from http://www.academia.edu/6879244/Technology_Creator_or_Savior_of_Social_Isolation

Critical Reflection

ES1102 expose me to the opportunity of giving and receiving feedback from my peers. Initially, I was not very comfortable in giving feedback as I was not confident in my English ability. Whenever I thought there might be a grammar mistake or an unclear phrasing, I would do a lot of double checkings before I gave feedback as I was unsure if I could provide the correct feedback. I was a very slow process in the beginning. But this also greatly improve my editing skills. I soon became comfortable in raising up my own opinion and provide my peers with suggestions.

I was very weak at writing essays. I often spend the entire day planning what to include and what would my arguments be. In the past, whenever I finished my essay I was unable to identify errors on my own as I had spent too much time on it. At ES1102, I am able to obtain feedback from my peers and tutor. They will share with me their feelings towards my essay and give suggestions. I am able to make improvements based on the feedback that they have given. After learning the skills of giving critical feedback, I can now easily review my own writing and make changes.

I will definitely apply the skills learned in the course to writing assignments in other modules. I had already applied the critical writing skills in my other module report. I found that I was able to organise my thoughts faster and in a clearer way. That greatly smooth out my report writing process. In the future, I will continue to improve my English skills and apply what I learned to practice.

Friday, 13 March 2015

Problem Solution Essay Draft 2

Nowadays, social media deeply penetrates young people's daily life. From sustaining friendships to expanding social circles, teenagers are heavily dependent on social media to construct their relationships with other people. In “Alone Together” by Turkle (2012), she mentions while social media was used as a tool to connect people, it is now causing wider separation. This isolation is extremely harmful to teenagers as they are in a crucial age of developing self awareness through interacting with other people. The only effective solution is for Infocomm Development Authority of Singapore (iDA) to pose regulations that draw clearer distinctions between individual's online social life from real life.

In order to gain public usage, social network providers are making their services as close as possible to people's real life. Social media application link users’ online identification to their phone numbers. Locating services that can expose the users’ locations and also provide the information on other people around the same area. Real life friends become online follower and online followers become real life friends. Teenagers growing up in such environment do not observe the difference between online social and offline social. As social media appears to be more efficient and powerful, they tend to put all their attentions on social media and at the same time sacrifice their offline social life. It is not shocking to see teenagers putting their heads into their phones whenever they are left alone even for just a few seconds. Nowadays, it is also more common to observe groups of young people gather together but each one of them still put their heads into their phones. As the definitions of virtual and real are not clearly defined and differentiated, there is high chance that teenagers will isolate themselves from other people and even the society

It is true that social media provides a fast channel for people to reach out to one another and easily get connect to people across space. While people start to rely on social media to develop their relationships, they also let the technology led them to undesirable places,  slowly without notice. People begins to build their relationships merely for the sake of connections. Social media only provide a mental relief but leave people physically and emotionally alone. Online information can be created, edited and deleted in a way that people can choose how they are perceived. People begin to hide their true self from one another and as such even though they are able to conduct communications in any place and at any time, they cannot truly understand each other. The purpose of communication has lost due to the pursuit of more connection. Thus social media generates a wider separation among people..  

Social isolation caused by social media largely affects teenager's communication skill. The methods of communication used in social media are largely in the form of texts or pictures. As efficiency is the priority in online social media communications, the language used is generally short, plain and straight to the point. When conveying a message, some details are skipped in order to obtain fast response and feedbacks. Wrong interpretations and false information are easily arise due to such fast food type of communication. Effective communication is not only about words. Other factors such as body language, eye contact, the tone of voice are crucial in conducting an effective communication. None of these can be seen in social media communications which opposite parties interact with each other through a flat screen and digitized information.

Solution proposed by Jones in ‘Technology: Creator or Savior of Social Isolation’ suggests that, technology can provides a platform to bring people together, to tighten social bonds. But the author does not realise that it is the same technology that is causing all the trouble. As people demand more on technology and less on each other, there will be absolutely no way that technology can reverse the situation no matter how advance it will be. Instead, it will only exacerbate the problem.

In order to solve the problem, it is necessary to target at its root cause. iDA should restrict social media providers from allowing their teenage users to access their full services. Some ways include limit the time which teenagers are allowed to access their social network accounts and do not disclose their profiles to the rest. The main purpose of this is to break the connection between online social life and real life. When teenagers start to realize they cannot apply what they obtain from online to real life, they will begin to move their focus away from virtual world.

Such measures cannot go without education. Societies, schools and families have to reinforce the importance of real world interactions and communications, through activities such as outing and family gathering, to reconstruct the lost bonds.

Individuals must not forgo their real social life in exchange for greater dependence on the virtual. Teenagers been a most vulnerable group will easily being carried away and become isolated and at the same time losing their communication skills. It is necessary for powerful authorities such as iDA to reverse the situation. As such, teenagers are able to enjoy the benefits of social media while minimize the harm associated with it.



Reference

Turkle, S. (2012). Alone Together. New York, NY: Basic Books.
Jones, C. Technology: Creator or Savior of Social Isolation [Supplemental material]. De Vry University Retrieved from http://www.academia.edu/6879244/Technology_Creator_or_Savior_of_Social_Isolation

Friday, 6 March 2015

Problem-Solution Essay Draft 1

Nowadays, social media deeply penetrates young people's daily life. From sustaining friendships to expanding social circles, teenagers are heavily dependent on social media to construct their relationships with other people. In “Alone Together” by Sherry Turkle (2012), she mentions while social media was used as a tool to connect people, it is now causing wider separation. This isolation is extremely harmful to teenagers as they are in a crucial age of developing self-awareness through interacting with other people. The only effective solution is for Infocomm Development Authority of Singapore (iDA) to pose regulations that draw clearer distinctions between individual's online social life from real life.


It is true that social media provides a fast channel for people to reach out to one another and easily get connect to people across space. While people start to rely on social media to develop their relationships, they also let the technology led them to undesirable places,  slowly without notice. People begin to build their relationships merely for the sake of connections. Social media only provide a mental relief but leave people physically and emotionally alone. Online information can be created, edited and deleted in a way that people can choose how they are perceived. People begins to hide their true self from one another and as such even though they are able to conduct communications in any place and at any time, they cannot truly understand each other. The purpose of communication has lost due to the pursuit of more connection. Thus, social media generates a wider separation among people.


In order to gain public usage, social network providers are making their services as close as possible to people's real life. Social media application link users’ online identification to their phone numbers, locating services that can expose the users locations and also provides the information on other people around the same area, real life friends become online follower and online followers become real life friends. Teenagers growing up in such environment do not observe the difference between online social and offline social. As social media appears to be more efficient and powerful, they tend to put all their attentions on social media and at the same time sacrifice their offline social life. It is not shocking to see teenagers putting their heads into their phones whenever they are left alone even for just a few seconds. Nowadays, it is also common to observe groups of young people gather together but each one of them still put their heads into their phones. As the definitions of virtual and real are not clearly defined and differentiated, there is high chance that teenagers will isolate themselves from other people and even the society.  


Social isolation caused by social media largely affects teenager's communication skill. The methods of communication used in social are largely in the form of texts or pictures. As the efficiency is the priority in online social media communications, the language used is generally short, plain and straight to the point. When conveying a message, some details are skipped in order to obtain a fast response and feedback. Wrong interpretations and false information are easily arise due to such fast food type of communication. Effective communication is not only about words. Other factors such as body language, eye contact, the tone of voice are crucial in conducting an effective communication. None of these can be seen in social media communications which opposite parties interact with each other through a flat screen and digitized information.


According to ‘Technology: Creator or Savior of Social Isolation’ by Christopher Jones, technology provides a platform to bring people together, to tighten social bonds. But the author does not  realize that it is the same technology that is causing all the trouble. As people demand more on technology and less on each other, there will be absolutely no way that technology can reverse the situation no matter how advance it will be. Instead, it will only exacerbate the problem.


In order to solve the problem, it is necessary to target at its root cause. iDA should restrict social media providers from allowing their teenage users to access their full services. Some ways include limiting the time which teenagers are allowed to access their social network accounts and setting quota on the number of followers and friends teenagers able to add into their accounts. The main purpose of this is to break the connection between online social life and real life. When teenagers start to realize they cannot apply what they obtain from online to real life, they will begin to move their focus away from the virtual world.


Such measures cannot go without education. Societies, schools, and families have to reinforce the importance of real world interactions and communications, through activities such as outing and family gathering, to reconstruct the lost bonds.


Individuals must not forgo their own skills and abilities in exchange for greater dependence on social media. Teenagers been a most vulnerable group will easily be carried away and become isolated and at the same time losing their communication skills. It is necessary for powerful solutions such as government intervention to reverse the situation. As such, teenagers are able to enjoy the benefits of social media while minimize the harm associated with it.


873 Words

Reference


Turkle, S. (2012). Alone Together. New York, NY: Basic Books.
Jones, C. Technology: Creator or Savior of Social Isolation [Supplemental material]. De Vry University Retrieved from http://www.academia.edu/6879244/Technology_Creator_or_Savior_of_Social_Isolation

Monday, 2 March 2015

An Influential Event

I was never a sport fan, but to my surprise, Japanese high school baseball game had shaped my character and influenced my perspective.

Years ago from a comics book, that was where I first encountered Japanese high school baseball. It appeared strange to me that the story characters were so obsessed with baseball. Curiosity drove me to discover more about it. I searched for the rules of the game; watched a couple of previous years games; followed some famous high school players. By the time I realised why the Japanese are so much into baseball, I was considered one of them too.

Baseball is highly competitive among high schools. Players usually started their training from a very young age. By knowing how much hard work they needed to put in, in order to fulfill their dream of representing their school to play in Koshien Stadium (Japanese National High School Stadium), really motivates me.

It encourages me to put in extra effort in everything I do, and never give up to achieve my goals. It also changed my way of seeing things. Competition to me is no longer about winning or losing. It is about the bond between team mates and the support from family and friends. I really hope one day such characteristics can lead me to my own Koshien. 

Monday, 16 February 2015

Reader Response Draft 3 (Final)

According to ‘The Perils of Over-sharing in Social Networks’ by David Emm (2014), there are
increasing worries about the invasion of privacy while using social networks. Emm emphasizes that over-reliance on the internet will expose people to online criminals. The information which people are sharing online may be collected by the ‘prying eyes’ and poses potential threats against them offline. The article also mentions that people tend to overlook the danger while using mobile network devices. Since it is not a common aim of an attack, it creates a “false sense of security”. Various ways to minimise the risk has suggested by Emm include installing internet security software and using distinct passwords for different  accounts.

What the article is trying to convey is not a totally foreign idea as cases of undesirable consequences caused by over-reliant on the social networks are clearly evident in people’s daily lives.

Most of the people indeed understand the negative impact of using social networks but they all believe such tragedy will not fall on them. The author uses examples to illustrate how harmless online posts can lead to negative consequences. As people’s social media is being closely but quietly monitored by their employers and government, they have no idea when will their comments be interpreted in a totally different way and used for a totally different purpose.

Emm mentions in his article that the information people choose to share online will affect their real lives. This is because people tend to believe the internet is an unrestrictive zone where they can freely express themselves. However, this is not true. The internet is regulated by various authorities. If they regard certain information as offensive, they might take actions against the uploader. In Yahoo news “ NUS student Sun Xun punished for ‘dog’ comment” by Sim (2012) proves that people have to bare the consequences for their insensitive comments posted on the internet. Even if the internet provides a convenient platform for people to exchange their thoughts, the users should still be careful about the information they shared online. Whatever goes online will not just be online.

Emm also mentions in his article that it is more risky to access internet through mobile devices. Due to the conveniency of smartphones and tablets, people are storing increasingly more personal information into such devices. In addition to that, there are actions taken unintentionally by the users which further expose themselves. Such actions include location enabling, in-app purchasing, and phone number verification. The consequence will be more severe if people use mobile devices for internet banking. Once the device is lost or stolen, it is impossible to safely retrieve the data back.

In conclusion, I agree with Emm's argument that over-reliance on the internet is dangerous. There are many loopholes on the internet security that criminals can take advantage off. Internet user's personal behavior such as over-sharing their personal information and inappropriate comments will further enhance the negative impact of using the internet.

Reference
David Emm. (2014, March 21). The Peril of Over-sharing in Social Networks [Web log post]
Retrieved from :
Sim. F (2012, March 27). NUS student Sun Xun punished for ‘dog’ comment. Yahoo News Singapore.

Retrieved from:

https://sg.news.yahoo.com/chinese-scholar-sun-xu-s-scholarship-terminated.html